-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
72 lines (68 loc) · 2.36 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
# In this example, you will see that Counter-Strike 2 server sends its HTTP logs to `source-udp-forwarder` which then proxies (forwards) logs to the HLStatsX:CE perl daemon.
version: '2.2'
services:
# 1. Counter-Strike 2 gameserver sends HTTP logs to source-udp-forwarder
# See: https://github.com/startersclan/docker-sourceservers
cs2:
image: sourceservers/cs2:latest
volumes:
- dns-volume:/dns:ro
ports:
- 27015:27015/tcp
- 27015:27015/udp
networks:
- default
stdin_open: true
tty: true
stop_signal: SIGKILL
depends_on:
- source-udp-forwarder
entrypoint:
- /bin/bash
command:
- -c
- |
set -eu
exec game/bin/linuxsteamrt64/cs2 -dedicated -port 27015 +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2 +rcon_password password +log on +logaddress_add_http "http://source-udp-forwarder:26999"
# 2. source-udp-forwarder proxy forwards gameserver logs to the daemon
# See: https://github.com/startersclan/source-udp-forwarder
source-udp-forwarder:
image: startersclan/source-udp-forwarder:latest
environment:
- LISTEN_ADDR=:26999
- UDP_FORWARD_ADDR=daemon:27500
- FORWARD_PROXY_KEY=somedaemonsecret # The daemon's proxy_key secret
- FORWARD_GAMESERVER_IP=192.168.1.100 # The gameserver's IP as registered in the HLStatsX:CE database
- FORWARD_GAMESERVER_PORT=27015 # The gameserver's IP as registered in the HLStatsX:CE database
- LOG_LEVEL=DEBUG
- LOG_FORMAT=txt
volumes:
- dns-volume:/dns
networks:
- default
depends_on:
- daemon
# 3. HLStatsX:CE perl daemon accepts the gameserver logs. Gameserver Logs are parsed and stats are recorded
# The daemon's proxy_key secret can only be setup in the HLStatsX:CE Web Admin Panel and not via env vars
# See: https://github.com/startersclan/hlstatsx-community-edition
daemon:
image: startersclan/hlstatsx-community-edition:1.11.0-daemon
ports:
- 27500:27500/udp # For external servers to send logs to the daemon
networks:
- default
command:
- --ip=0.0.0.0
- --port=27500
- --db-host=db:3306
- --db-name=hlstatsxce
- --db-username=hlstatsxce
- --db-password=hlstatsxce
- --nodns-resolveip
- --debug
# - --debug
# - --help
networks:
default:
volumes:
dns-volume: