-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
70 lines (70 loc) · 2.5 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
69
70
version: '3.7'
services:
varnish:
image: keopx/varnish:${VARNISH_VERSION}
container_name: "${PROJECT_NAME}_varnish"
network_mode: traefik_default
environment:
- VARNISH_PORT=${VARNISH_BACKEND_PORT}
- VARNISH_MEMORY=${VARNISH_MEMORY}
# Next values only works with default default.vcl file.
- VARNISH_BACKEND_IP=${PROJECT_NAME}_web
- VARNISH_BACKEND_PORT=${VARNISH_BACKEND_PORT}
labels:
- 'traefik.port=80'
- 'traefik.backend=${PROJECT_NAME}_varnish'
- 'traefik.frontend.rule=Host:${PROJECT_NAME}.varnish.localhost'
web:
image: keopx/apache-php:${PHP_VERSION}
container_name: "${PROJECT_NAME}_web"
network_mode: traefik_default
volumes:
- ${WEB_DATA_DIR}:/var/www/html # Data.
## SSH support. Uncomment environment -> # - SSH_AUTH_SOCK=/ssh-agent
- ${SSH_AUTH_SOCK}:/ssh-agent
environment:
## Use webroot directory. i.e: /web for drupal scaffolding.
- WEB_ROOT
## SSH support. Uncomment volumes -> # - ${SSH_AUTH_SOCK}:/ssh-agent
- SSH_AUTH_SOCK=/ssh-agent
working_dir: /var/www/html
labels:
- 'traefik.port=80'
- 'traefik.backend=${PROJECT_NAME}_web'
- 'traefik.frontend.rule=HostRegexp:${PROJECT_URL}, {subdomain:[^.]+}.${PROJECT_URL}'
mysql:
image: keopx/${MYSQL_TYPE}:${MYSQL_VERSION}
container_name: "${PROJECT_NAME}_${MYSQL_HOST}"
network_mode: traefik_default
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
redis:
image: keopx/redis:${REDIS_VERSION}
container_name: "${PROJECT_NAME}_redis"
labels:
- 'traefik.backend=${PROJECT_NAME}_redis'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:${PROJECT_NAME}.redis.localhost'
pma:
image: phpmyadmin/phpmyadmin
container_name: "${PROJECT_NAME}_pma"
network_mode: traefik_default
environment:
- PMA_USER=${MYSQL_ROOT_USER:-root}
- PMA_PASSWORD=${MYSQL_ROOT_PASSWORD}
- PMA_HOST=${PROJECT_NAME}_${MYSQL_HOST}
labels:
- 'traefik.backend=${PROJECT_NAME}_pma'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:${PROJECT_NAME}.pma.localhost'
mail:
image: mailhog/mailhog
container_name: "${PROJECT_NAME}_mailhog"
network_mode: traefik_default
labels:
- 'traefik.backend=${PROJECT_NAME}_mailhog'
- 'traefik.port=8025'
- 'traefik.frontend.rule=Host:${PROJECT_NAME}.mailhog.localhost'