-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·142 lines (133 loc) · 3.19 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
services:
nginx:
image: "nginx:stable"
volumes:
- ".:/var/www/html:rw"
- "./docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro"
healthcheck:
test: [ "CMD-SHELL", "service nginx status || exit 1" ]
timeout: 2s
retries: 10
interval: 5s
restart: "unless-stopped"
networks:
default:
aliases:
- "mailer.press"
- "mailhog.mailer.press"
mailer:
user: "${UID:-1000}:${GID:-1000}"
environment:
- XDEBUG_TRIGGER
- XDEBUG_CONFIG
- PHP_IDE_CONFIG=serverName=mailer.press
build:
context: "./docker/php"
args:
UID: ${UID:-1000}
GID: ${GID:-1000}
UNAME: ${UNAME:-docker}
volumes:
- ".:/var/www/html:rw"
depends_on:
nginx:
condition: service_healthy
mysql:
condition: service_healthy
redis:
condition: service_healthy
mailhog:
condition: service_started
restart: "unless-stopped"
cron:
build:
context: "./docker/php"
args:
UID: ${UID:-1000}
GID: ${GID:-1000}
UNAME: ${UNAME:-docker}
volumes:
- ".:/var/www/html:rw"
depends_on:
mailer:
condition: service_started
mysql:
condition: service_healthy
entrypoint: ["/usr/local/bin/cron.sh"]
restart: "unless-stopped"
hermes-worker:
user: "${UID:-1000}:${GID:-1000}"
build:
context: "./docker/php"
args:
UID: ${UID:-1000}
GID: ${GID:-1000}
UNAME: ${UNAME:-docker}
volumes:
- ".:/var/www/html:rw"
depends_on:
mailer:
condition: service_started
mysql:
condition: service_healthy
entrypoint: ["php", "bin/command.php", "worker:hermes"]
restart: "unless-stopped"
mail-worker:
user: "${UID:-1000}:${GID:-1000}"
build:
context: "./docker/php"
args:
UID: ${UID:-1000}
GID: ${GID:-1000}
UNAME: ${UNAME:-docker}
volumes:
- ".:/var/www/html:rw"
depends_on:
mailer:
condition: service_started
mailhog:
condition: service_started
entrypoint: ["php", "bin/command.php", "worker:mail"]
restart: "unless-stopped"
mysql:
image: "mysql:8.0"
cap_add:
- SYS_NICE
volumes:
- "mysql-data:/var/lib/mysql"
- ".:/data"
command:
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
- "--skip-character-set-client-handshake"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "no"
MYSQL_ROOT_PASSWORD: "secret"
MYSQL_DATABASE: "mailer"
healthcheck:
test: [ "CMD", "mysqladmin" , "ping", "-h", "localhost" ]
timeout: 2s
retries: 10
interval: 5s
restart: "unless-stopped"
redis:
image: "redis:6.2"
volumes:
- "redis-data:/data"
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
timeout: 2s
retries: 10
interval: 5s
restart: "unless-stopped"
mailhog:
image: "mailhog/mailhog:v1.0.1"
environment:
MH_HOSTNAME: "mailhog.mailer.press"
volumes:
mysql-data:
driver: local
redis-data:
driver: local
networks:
default: