aboutsummaryrefslogtreecommitdiffstats
path: root/docker-compose.yml
diff options
context:
space:
mode:
authorClaude <longneck@scratchbook.ch>2019-11-23 16:58:17 +0100
committerClaude <longneck@scratchbook.ch>2019-11-23 16:58:17 +0100
commit4462a471c516691ccc4dcb335d74063dae1ecd8f (patch)
tree3311ca1be8502085386ee54e535201569940138b /docker-compose.yml
parente5797845078f4b1f3ce9441eea9d4c355cbe12b7 (diff)
downloadstikked-fit-4462a471c516691ccc4dcb335d74063dae1ecd8f.tar.gz
stikked-fit-4462a471c516691ccc4dcb335d74063dae1ecd8f.tar.bz2
stikked-fit-4462a471c516691ccc4dcb335d74063dae1ecd8f.zip
Rewrite Docker-Setup
* make it simpler and cleaner * switch to nginx-alpine and php-fpm-alpine * docker-compose: autobuild php-image for stikked * serve all files directly (htdocs is mounted instead of copied) * stikked-configuration for docker resides in docker/stikked.php
Diffstat (limited to 'docker-compose.yml')
-rw-r--r--docker-compose.yml48
1 files changed, 25 insertions, 23 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
index f06d1de..834b802 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,29 +1,31 @@
-version: "3.2"
+version: "3.7"
services:
- db:
- image: mysql:latest
+ nginx:
+ image: nginx:1.17-alpine
volumes:
- - db_data:/var/lib/mysql
- env_file: docker/stikked-envvars.txt
-
- stikked:
- depends_on:
- - db
- image: stikked
- env_file: docker/stikked-envvars.txt
+ - ./docker/nginx.conf:/etc/nginx/conf.d/default.conf:ro
+ - ./htdocs:/htdocs:ro
ports:
- - 80:80
-
-# You should use persistant storage for this,
-# as if the volume is deleted, everything is gone!
-volumes:
- db_data:
+ - 127.0.0.1:80:80/tcp
-# Example of NFS backed persistant storage:
-# db_data:
-# driver_opts:
-# type: "nfs"
-# o: "addr=192.168.1.254,nolock,soft,rw"
-# device: ":/nfs/export/pbdatabase"
+ php:
+ image: stikked-php:1
+ volumes:
+ - ./docker/php.ini:/usr/local/etc/php/php.ini:ro
+ - ./docker/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf:ro
+ - ./htdocs:/htdocs
+ - ./docker/stikked.php:/htdocs/application/config/stikked.php:ro
+ build:
+ context: ./docker/php
+ mysql:
+ image: mariadb:10.4
+ command: mysqld --innodb-buffer-pool-size=4000000000
+ volumes:
+ - ./mysql-datadir_customize-in-docker-compose.yml:/var/lib/mysql
+ environment:
+ MYSQL_ROOT_PASSWORD: root
+ MYSQL_DATABASE: stikked
+ MYSQL_USER: stikked
+ MYSQL_PASSWORD: stikked

© 2014-2024 Faster IT GmbH | imprint | privacy policy