aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--docker-compose.yml90
-rw-r--r--docker/php/Dockerfile5
2 files changed, 53 insertions, 42 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
index c774b621..50d8c546 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,42 +1,48 @@
1nginx: 1version: '2'
2 image: nginx 2services:
3 ports: 3 nginx:
4 - "8080:80" 4 image: nginx
5 volumes: 5 ports:
6 - ./docker/nginx/nginx.conf:/nginx.conf 6 - "8080:80"
7 - ./docker/logs/nginx:/var/log/nginx 7 volumes:
8 - .:/var/www/html 8 - ./docker/nginx/nginx.conf:/nginx.conf
9 links: 9 - ./docker/logs/nginx:/var/log/nginx
10 - php:php 10 - .:/var/www/html
11 command: nginx -c /nginx.conf 11 links:
12php: 12 - php:php
13 build: docker/php 13 command: nginx -c /nginx.conf
14 ports: 14 php:
15 - "9000:9000" 15 build:
16 volumes: 16 context: docker/php
17 - .:/var/www/html 17 args:
18 #links: 18 # Set here your timezone using one of this: http://php.net/manual/en/timezones.php
19 # - "postgres:rdbms" 19 timezone: 'Europe/Monaco'
20 # - "mariadb:rdbms" 20 ports:
21 env_file: 21 - "9000:9000"
22 - ./docker/php/env 22 volumes:
23 # Comment non-used DBMS lines 23 - .:/var/www/html
24 # If all DBMS are commented out, sqlite will be used as default 24 #links:
25 # - ./docker/postgres/env 25 # - "postgres:rdbms"
26 # - ./docker/mariadb/env 26 # - "mariadb:rdbms"
27#postgres: 27 env_file:
28# image: postgres:9 28 - ./docker/php/env
29# ports: 29 # Comment non-used DBMS lines
30# - "5432:5432" 30 # If all DBMS are commented out, sqlite will be used as default
31# volumes: 31 # - ./docker/postgres/env
32# - ./docker/data/pgsql:/var/lib/postgresql/data 32 # - ./docker/mariadb/env
33# env_file: 33 #postgres:
34# - ./docker/postgres/env 34 # image: postgres:9
35#mariadb: 35 # ports:
36# image: mariadb:10 36 # - "5432:5432"
37# ports: 37 # volumes:
38# - "3306:3306" 38 # - ./docker/data/pgsql:/var/lib/postgresql/data
39# volumes: 39 # env_file:
40# - ./docker/data/mariadb:/var/lib/mysql 40 # - ./docker/postgres/env
41# env_file: 41 #mariadb:
42# - ./docker/mariadb/env 42 # image: mariadb:10
43 # ports:
44 # - "3306:3306"
45 # volumes:
46 # - ./docker/data/mariadb:/var/lib/mysql
47 # env_file:
48 # - ./docker/mariadb/env
diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile
index 7c56ae57..29d27c3a 100644
--- a/docker/php/Dockerfile
+++ b/docker/php/Dockerfile
@@ -1,10 +1,15 @@
1FROM php:fpm 1FROM php:fpm
2 2
3# Default timezone. To change it, use the argument in the docker-compose.yml file
4ARG timezone='Europe/Paris'
5
3RUN apt-get update && apt-get install -y \ 6RUN apt-get update && apt-get install -y \
4 libmcrypt-dev libicu-dev libpq-dev libxml2-dev \ 7 libmcrypt-dev libicu-dev libpq-dev libxml2-dev \
5 && docker-php-ext-install \ 8 && docker-php-ext-install \
6 iconv mcrypt mbstring intl pdo pdo_mysql pdo_pgsql 9 iconv mcrypt mbstring intl pdo pdo_mysql pdo_pgsql
7 10
11RUN echo "date.timezone="$timezone > /usr/local/etc/php/conf.d/date_timezone.ini
12
8RUN usermod -u 1000 www-data 13RUN usermod -u 1000 www-data
9 14
10CMD ["php-fpm"] 15CMD ["php-fpm"]