-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
59 lines (47 loc) · 1.24 KB
/
compose.yaml
File metadata and controls
59 lines (47 loc) · 1.24 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
services:
steamcmd:
build:
context: .
dockerfile: Dockerfile.steamcmd
image: docker-strike/steamcmd
deploy:
replicas: 0 # This is just an intermediate image.
hlds:
container_name: hlds
depends_on:
- steamcmd
build:
context: .
dockerfile: Dockerfile.hlds
args:
GAME: ${GAME:-cstrike}
image: docker-strike/hlds
env_file:
- .env
volumes:
- ./data/${GAME:-cstrike}:/mnt/${GAME:-cstrike}:ro
command:
[
"-game", "${GAME:-cstrike}",
"+ip", "${IP_ADDRESS:-0.0.0.0}",
"+port", "${PORT:-27015}",
"+maxplayers", "${MAX_PLAYERS:-24}",
"+map", "${MAP:-de_dust2}",
+servercfgfile", "${CONFIG_FILE:-server.cfg}",
"+hostname", "${SERVER_NAME:-Docker-Strike}",
"-autoupdate", # do NOT auto update HLDS because it might fail.
"-insecure" # VAC doesn't work, don't even bother.
]
network_mode: bridge
ports:
- "${PORT:-27015}:${PORT:-27015}/udp"
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
healthcheck:
test: ["CMD", "pgrep", "hlds_linux"]
interval: 30s
timeout: 10s
retries: 3