diff options
author | djay <trash@goovy.com> | 2016-03-02 13:31:53 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-03-09 09:04:19 +0100 |
commit | 612f5f1ec7eeaeacb1f1bc0f2e15fbe5ff7d7044 (patch) | |
tree | ac1dac991c9cb9c142a20fca4825d1c7ba0faa95 | |
parent | 125460345fe4bd0ed9be48a9fbc0657019637a01 (diff) | |
download | wallabag-612f5f1ec7eeaeacb1f1bc0f2e15fbe5ff7d7044.tar.gz wallabag-612f5f1ec7eeaeacb1f1bc0f2e15fbe5ff7d7044.tar.zst wallabag-612f5f1ec7eeaeacb1f1bc0f2e15fbe5ff7d7044.zip |
Add the timezone as an argument in the docker-compose.
For that, need to use v2 of docker-compose (with version >= 1.6.0)
-rw-r--r-- | docker-compose.yml | 89 | ||||
-rw-r--r-- | docker/php/Dockerfile | 4 |
2 files changed, 50 insertions, 43 deletions
diff --git a/docker-compose.yml b/docker-compose.yml index c774b621..26fba8f0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml | |||
@@ -1,42 +1,47 @@ | |||
1 | nginx: | 1 | version: '2' |
2 | image: nginx | 2 | services: |
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: |
12 | php: | 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 | timezone: 'Europe/Monaco' |
19 | # - "postgres:rdbms" | 19 | ports: |
20 | # - "mariadb:rdbms" | 20 | - "9000:9000" |
21 | env_file: | 21 | volumes: |
22 | - ./docker/php/env | 22 | - .:/var/www/html |
23 | # Comment non-used DBMS lines | 23 | #links: |
24 | # If all DBMS are commented out, sqlite will be used as default | 24 | # - "postgres:rdbms" |
25 | # - ./docker/postgres/env | 25 | # - "mariadb:rdbms" |
26 | # - ./docker/mariadb/env | 26 | env_file: |
27 | #postgres: | 27 | - ./docker/php/env |
28 | # image: postgres:9 | 28 | # Comment non-used DBMS lines |
29 | # ports: | 29 | # If all DBMS are commented out, sqlite will be used as default |
30 | # - "5432:5432" | 30 | # - ./docker/postgres/env |
31 | # volumes: | 31 | # - ./docker/mariadb/env |
32 | # - ./docker/data/pgsql:/var/lib/postgresql/data | 32 | #postgres: |
33 | # env_file: | 33 | # image: postgres:9 |
34 | # - ./docker/postgres/env | 34 | # ports: |
35 | #mariadb: | 35 | # - "5432:5432" |
36 | # image: mariadb:10 | 36 | # volumes: |
37 | # ports: | 37 | # - ./docker/data/pgsql:/var/lib/postgresql/data |
38 | # - "3306:3306" | 38 | # env_file: |
39 | # volumes: | 39 | # - ./docker/postgres/env |
40 | # - ./docker/data/mariadb:/var/lib/mysql | 40 | #mariadb: |
41 | # env_file: | 41 | # image: mariadb:10 |
42 | # - ./docker/mariadb/env | 42 | # ports: |
43 | # - "3306:3306" | ||
44 | # volumes: | ||
45 | # - ./docker/data/mariadb:/var/lib/mysql | ||
46 | # env_file: | ||
47 | # - ./docker/mariadb/env | ||
diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile index c230bc44..b43d40b5 100644 --- a/docker/php/Dockerfile +++ b/docker/php/Dockerfile | |||
@@ -1,11 +1,13 @@ | |||
1 | FROM php:fpm | 1 | FROM php:fpm |
2 | 2 | ||
3 | ARG timezone='Europe/Paris' | ||
4 | |||
3 | RUN apt-get update && apt-get install -y \ | 5 | RUN apt-get update && apt-get install -y \ |
4 | libmcrypt-dev libicu-dev libpq-dev libxml2-dev \ | 6 | libmcrypt-dev libicu-dev libpq-dev libxml2-dev \ |
5 | && docker-php-ext-install \ | 7 | && docker-php-ext-install \ |
6 | iconv mcrypt mbstring intl pdo pdo_mysql pdo_pgsql | 8 | iconv mcrypt mbstring intl pdo pdo_mysql pdo_pgsql |
7 | 9 | ||
8 | RUN echo "date.timezone=Europe/Paris" > /usr/local/etc/php/conf.d/date_timezone.ini | 10 | RUN echo "date.timezone="$timezone > /usr/local/etc/php/conf.d/date_timezone.ini |
9 | 11 | ||
10 | RUN usermod -u 1000 www-data | 12 | RUN usermod -u 1000 www-data |
11 | 13 | ||