-
Notifications
You must be signed in to change notification settings - Fork 11
/
docker-compose.yml
95 lines (89 loc) · 2.07 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
x-mautic-volumes:
&mautic-volumes
- ./mautic/config:/var/www/html/config:z
- ./mautic/logs:/var/www/html/var/logs:z
- ./mautic/media/files:/var/www/html/docroot/media/files:z
- ./mautic/media/images:/var/www/html/docroot/media/images:z
- ./cron:/opt/mautic/cron:z
services:
db:
image: mysql:8.0
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: mysqladmin --user=$$MYSQL_USER --password=$$MYSQL_PASSWORD ping
start_period: 5s
interval: 5s
timeout: 5s
retries: 10
networks:
- default
mautic_web:
build:
context: .
dockerfile: Dockerfile
links:
- db:mysql
ports:
- ${MAUTIC_PORT:-8001}:80
volumes: *mautic-volumes
environment:
- DOCKER_MAUTIC_LOAD_TEST_DATA=${DOCKER_MAUTIC_LOAD_TEST_DATA}
- DOCKER_MAUTIC_RUN_MIGRATIONS=${DOCKER_MAUTIC_RUN_MIGRATIONS}
env_file:
- .mautic_env
healthcheck:
test: curl http://localhost
start_period: 5s
interval: 5s
timeout: 5s
retries: 100
depends_on:
db:
condition: service_healthy
networks:
- default
mautic_cron:
build:
context: .
dockerfile: Dockerfile
links:
- db:mysql
volumes: *mautic-volumes
environment:
- DOCKER_MAUTIC_ROLE=mautic_cron
env_file:
- .mautic_env
depends_on:
mautic_web:
condition: service_healthy
networks:
- default
mautic_worker:
build:
context: .
dockerfile: Dockerfile
links:
- db:mysql
volumes: *mautic-volumes
environment:
- DOCKER_MAUTIC_ROLE=mautic_worker
env_file:
- .mautic_env
depends_on:
mautic_web:
condition: service_healthy
networks:
- default
deploy:
replicas: 1
volumes:
mysql-data:
networks:
default:
name: ${COMPOSE_PROJECT_NAME}-docker