This repository has been archived by the owner on Dec 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
68 lines (63 loc) · 1.69 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
version: "2.3"
services:
mariadb:
image: wodby/mariadb:10.2-3.1.3
env_file: ./.env
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'true'
MYSQL_DATABASE: ${DATABASE_NAME}
MYSQL_USER: ${DATABASE_USER}
MYSQL_PASSWORD: ${DATABASE_PASSWORD}
# ports:
# - '3306:3306'
volumes:
- mariadb:/var/lib/mysql
# Place init .sql file(s) here
- ./mariadb-init:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
retries: 10
php:
image: wodby/drupal-php:7.2-4.7.5
env_file: ./.env
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
ENVIRONMENT: ${ENVIRONMENT}
DATABASE_PORT: ${DATABASE_PORT}
DATABASE_NAME: ${DATABASE_NAME}
DATABASE_USER: ${DATABASE_USER}
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
DATABASE_HOST: ${DATABASE_HOST}
volumes:
- ./:${DRUPAL_ROOT}:delegated
depends_on:
mariadb:
condition: service_healthy
nginx:
image: wodby/drupal-nginx:8-1.13-4.0.3
env_file: ./.env
depends_on:
- php
environment:
NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
NGINX_BACKEND_HOST: php
NGINX_SERVER_ROOT: ${SERVER_ROOT}
volumes:
- ./:${DRUPAL_ROOT}:delegated
labels:
- 'traefik.backend=nginx'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:${URL_SITE}'
traefik:
image: traefik:v1.7
env_file: ./.env
command: -c /dev/null --web --docker --logLevel=INFO
ports:
- '80:80'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
volumes:
mariadb:
driver: "local"