forked from wodby/docker4drupal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
57 lines (52 loc) · 1.58 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
version: "3"
services:
web:
image: nginx:$NGINX_TAG
container_name: "${PROJECT_NAME}_nginx"
volumes:
- "./drupal/web:/var/www/html"
- "./drupal/nginx.conf:/etc/nginx/conf.d/default.conf"
depends_on:
- php
labels:
- 'traefik.backend=${PROJECT_NAME}_nginx'
- "traefik.port=${NGINX_PORT}"
- 'traefik.frontend.rule=Host:${PROJECT_BASE_URL}'
php:
image: drupal:$DRUPAL_TAG
container_name: "${PROJECT_NAME}_drupal"
volumes:
- "./drupal/web:/var/www/html"
restart: always
depends_on:
- mysql
mysql:
image: mysql:$MYSQL_TAG
container_name: "${PROJECT_NAME}_mysql"
entrypoint: ['/entrypoint.sh', '--default-authentication-plugin=mysql_native_password']
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_USER: $DB_USER
MYSQL_PASSWORD: $DB_PASSWORD
MYSQL_DATABASE: $DB_NAME
volumes:
- "./drupal/mysql:/var/lib/mysql"
restart: always
portainer:
image: portainer/portainer
container_name: "${PROJECT_NAME}_portainer"
command: --no-auth -H unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
- 'traefik.backend=${PROJECT_NAME}_portainer'
- 'traefik.port=9000'
- 'traefik.frontend.rule=Host:portainer.${PROJECT_BASE_URL}'
traefik:
image: traefik
container_name: "${PROJECT_NAME}_traefik"
command: -c /dev/null --web --docker --logLevel=INFO
ports:
- '8080:80'
volumes:
- /var/run/docker.sock:/var/run/docker.sock