-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
78 lines (76 loc) · 1.89 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
services:
teamspeak:
image: ${IMAGE_TEAMSPEAK_NAME}:${IMAGE_TEAMSPEAK_VERSION}
restart: unless-stopped
secrets:
- db_password
- serveradmin_password
ports:
- 9987:9987/udp
- 10011:10011
- 30033:30033
env_file:
- .env.teamspeak
# extra_hosts:
# - accounting.teamspeak.com:127.0.0.1
# - backupaccounting.teamspeak.com:127.0.0.1
# - ipcheck.teamspeak.com:127.0.0.1
volumes:
#START - only for linux
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
#END - only for linux
- .docker/data/ts:/var/ts3server
depends_on:
db:
condition: service_healthy
healthcheck:
test: nc -uz localhost 9987 && nc -z localhost 10011 && nc -z localhost 30033
interval: 10s
timeout: 3s
retries: 10
start_period: 15s
deploy:
resources:
limits:
cpus: '1.00'
memory: 384M
reservations:
cpus: '0.50'
memory: 128M
db:
image: ${IMAGE_DB_NAME}:${IMAGE_DB_VERSION}
restart: unless-stopped
secrets:
- db_root_password
- db_password
env_file:
- .env.db
volumes:
#START - only for linux
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
#END - only for linux
- .docker/data/db:/var/lib/mysql
- .docker/db/conf.d/teamspeak.cnf:/etc/mysql/conf.d/teamspeak.cnf:ro
healthcheck:
test: mysqladmin ping -p$$(cat $${MYSQL_ROOT_PASSWORD_FILE})
interval: 5s
timeout: 2s
retries: 10
start_period: 15s
deploy:
resources:
limits:
cpus: '1.00'
memory: 512M
reservations:
cpus: '0.50'
memory: 256M
secrets:
db_root_password:
file: ./secrets/db_root_password.txt
db_password:
file: ./secrets/db_password.txt
serveradmin_password:
file: ./secrets/serveradmin_password.txt