generated from kennarddh-mindustry/genesis-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.production.1.yml
236 lines (226 loc) · 5.3 KB
/
docker-compose.production.1.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
version: '3.8'
services:
survival-server:
build:
context: .
dockerfile: ./prod/Dockerfiles/mindustry.Dockerfile
init: true
tty: true
stdin_open: true
stop_signal: SIGTERM
stop_grace_period: 15s
ports:
- "6567:6567/tcp"
- "6567:6567/udp"
volumes:
- ./prod/maps/survival:/app/config/maps/
- survival-server-saves:/app/config/saves/
networks:
- toast
env_file:
- ./prod/.env.common
environment:
SERVER: Survival
PORT: 6567
healthcheck:
test: [ 'CMD-SHELL', 'ss -ltu | grep $$PORT | wc -l | grep 2' ]
interval: 30s
timeout: 20s
retries: 5
start_period: 1m
depends_on:
database:
condition: service_healthy
rabbitmq:
condition: service_healthy
discovery-redis:
condition: service_healthy
restart: unless-stopped
deploy:
resources:
limits:
memory: 600M
cpus: '1'
attack-server:
build:
context: .
dockerfile: ./prod/Dockerfiles/mindustry.Dockerfile
init: true
tty: true
stdin_open: true
stop_signal: SIGTERM
stop_grace_period: 15s
ports:
- "6568:6568/tcp"
- "6568:6568/udp"
volumes:
- ./prod/maps/attack:/app/config/maps/
- attack-server-saves:/app/config/saves/
networks:
- toast
env_file:
- ./prod/.env.common
environment:
SERVER: Attack
PORT: 6568
healthcheck:
test: [ 'CMD-SHELL', 'ss -ltu | grep $$PORT | wc -l | grep 2' ]
interval: 30s
timeout: 20s
retries: 5
start_period: 1m
depends_on:
database:
condition: service_healthy
rabbitmq:
condition: service_healthy
discovery-redis:
condition: service_healthy
verify-discord-redis:
condition: service_healthy
restart: unless-stopped
deploy:
resources:
limits:
memory: 600M
cpus: '1'
discord-bot:
build:
context: .
dockerfile: ./prod/Dockerfiles/discord.Dockerfile
init: true
stop_signal: SIGTERM
stop_grace_period: 15s
networks:
- toast
env_file:
- ./prod/.env.common
- ./prod/.env.discord
depends_on:
database:
condition: service_healthy
rabbitmq:
condition: service_healthy
discovery-redis:
condition: service_healthy
verify-discord-redis:
condition: service_healthy
restart: unless-stopped
deploy:
resources:
limits:
memory: 300M
cpus: '1'
discovery-redis:
image: redis:7.2.4-alpine
command: redis-server /usr/local/etc/redis/redis.conf
init: true
ports:
- "6379:6379"
volumes:
- ./prod/discovery-redis/redis.conf:/usr/local/etc/redis/redis.conf
- ./prod/discovery-redis/users.acl:/usr/local/etc/redis/users.acl
healthcheck:
test: [ 'CMD-SHELL', 'redis-cli ping | grep PONG' ]
networks:
- toast
restart: unless-stopped
deploy:
resources:
limits:
memory: 15M
cpus: '0.2'
verify-discord-redis:
image: redis:7.2.4-alpine
command: redis-server /usr/local/etc/redis/redis.conf
init: true
ports:
- "6380:6379"
volumes:
- ./prod/verify-discord-redis/redis.conf:/usr/local/etc/redis/redis.conf
- ./prod/verify-discord-redis/users.acl:/usr/local/etc/redis/users.acl
healthcheck:
test: [ 'CMD-SHELL', 'redis-cli ping | grep PONG' ]
networks:
- toast
restart: unless-stopped
deploy:
resources:
limits:
memory: 15M
cpus: '0.2'
database:
image: mariadb:lts
init: true
env_file:
- ./prod/.env.database
volumes:
- ./prod/mysql/my.cnf:/etc/mysql/my.cnf
- data:/var/lib/mysql
command: bash -c "chmod 644 /etc/mysql/*.cnf && /usr/local/bin/docker-entrypoint.sh mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci"
ports:
- "3306:3306"
healthcheck:
test:
[
'CMD',
'/usr/local/bin/healthcheck.sh',
'--su-mysql',
'--connect',
'--innodb_initialized',
]
networks:
- toast
restart: unless-stopped
deploy:
resources:
limits:
memory: 300M
cpus: '1'
rabbitmq:
image: rabbitmq:3.12-management
init: true
hostname: rabbitmq
ports:
- "5672:5672"
- "15672:15672"
volumes:
- ./prod/rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
- rabbitmq-data:/var/lib/rabbitmq/mnesia/
env_file:
- ./prod/.env.rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q check_port_connectivity
networks:
- toast
restart: unless-stopped
deploy:
resources:
limits:
memory: 300M
cpus: '1'
portainer:
image: portainer/portainer-ce:2.19.4-alpine
init: true
ports:
- "8000:8000"
- "9443:9443"
volumes:
- portainer-data:/data
- /var/run/docker.sock:/var/run/docker.sock
networks:
- toast
restart: unless-stopped
deploy:
resources:
limits:
memory: 50M
cpus: '0.5'
volumes:
data:
rabbitmq-data:
portainer-data:
survival-server-saves:
attack-server-saves:
networks:
toast: