-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·63 lines (61 loc) · 1.92 KB
/
Copy pathdocker-compose.yml
File metadata and controls
executable file
·63 lines (61 loc) · 1.92 KB
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
services:
dst-master:
build: .
container_name: dst-master
restart: unless-stopped
ports:
- "10999:10999/udp"
- "27016:27016/udp"
- "8766:8766/udp"
# 10888 es el puerto inter-shard (UDP interno entre contenedores).
# No se expone al host — Caves lo alcanza por la red interna de Docker.
env_file: .env
environment:
- SHARD_NAME=Master
- SKIP_UPDATE=false
volumes:
- dst-bin:/opt/dst_server
- ./dst-data:/data
- ./dedicated_server_mods_setup.lua:/tmp/dedicated_server_mods_setup.lua
- steam-workshop:/home/steam/.steam/steam/steamapps
healthcheck:
# El puerto 10888 es UDP — nc -z (TCP) nunca funciona contra él.
# En su lugar comprobamos que el proceso existe y que el log muestra
# "Sim paused" o "Online Server Started", que DST imprime cuando el
# mundo ha generado y el shard está listo para aceptar a Caves.
test: ["CMD-SHELL", "pgrep -f dontstarve_dedicated > /dev/null && grep -q 'Online Server Started' /data/DoNotStarveTogether/Cluster_1/Master/server_log.txt"]
interval: 15s
timeout: 5s
retries: 24 # 24 * 15s = 6 min de margen para generar mundo + descargar mods
start_period: 30s
deploy:
resources:
limits:
memory: 4G
dst-caves:
build: .
container_name: dst-caves
restart: unless-stopped
depends_on:
dst-master:
condition: service_healthy
ports:
- "11000:11000/udp"
- "27017:27017/udp"
- "8767:8767/udp"
env_file: .env
environment:
- SHARD_NAME=Caves
- SKIP_UPDATE=true
volumes:
- dst-bin:/opt/dst_server
- ./dst-data:/data
- ./dedicated_server_mods_setup.lua:/tmp/dedicated_server_mods_setup.lua
- steam-workshop:/home/steam/.steam/steam/steamapps
deploy:
resources:
limits:
memory: 4G
volumes:
dst-bin:
steam-workshop: