-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (83 loc) · 3.14 KB
/
Copy pathdocker-compose.yml
File metadata and controls
87 lines (83 loc) · 3.14 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Trackmania 2020 dedicated server + PyPlanet controller (Python 3.12 fork)
# + MariaDB, in one Compose project. Copy .env.example to .env, fill it in,
# then: docker compose up -d --build
name: tm2020-pyplanet
services:
# --- Database for the PyPlanet controller ---
db:
image: mariadb:11
restart: unless-stopped
command: ["--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci"]
environment:
MARIADB_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MARIADB_DATABASE: ${DB_NAME:-pyplanet}
MARIADB_USER: ${DB_USER:-pyplanet}
MARIADB_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- dbdata:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 18
# --- Official Nadeo dedicated server (evoesports image) ---
dedicated:
image: evoesports/trackmania:latest
restart: unless-stopped
stop_grace_period: 30s
environment:
TM_MASTERSERVER_LOGIN: ${TM_MASTERSERVER_LOGIN}
TM_MASTERSERVER_PASSWORD: ${TM_MASTERSERVER_PASSWORD}
TM_SERVER_NAME: ${TM_SERVER_NAME:-PyPlanet TM2020 Server}
TM_SYSTEM_XMLRPC_ALLOWREMOTE: "True"
TM_AUTHORIZATION_SUPERADMIN_PASSWORD: ${XMLRPC_SUPERADMIN}
TM_AUTHORIZATION_ADMIN_PASSWORD: ${XMLRPC_ADMIN}
TM_AUTHORIZATION_USER_PASSWORD: ${XMLRPC_USER}
# Player and spectator slot limits (default 32 each).
TM_SERVER_MAX_PLAYERS: ${TM_SERVER_MAX_PLAYERS:-32}
TM_SERVER_MAX_SPECTATORS: ${TM_SERVER_MAX_SPECTATORS:-32}
# Bandwidth: raise for many players/spectators (server upload is the lever).
TM_SYSTEM_CONNECTION_UPLOADRATE: ${TM_UPLOADRATE:-30000}
TM_SYSTEM_CONNECTION_DOWNLOADRATE: ${TM_DOWNLOADRATE:-30000}
ports:
- "2350:2350/tcp"
- "2350:2350/udp"
volumes:
- userdata:/server/UserData
# Reserve resources so the game sim is never starved on a busy host.
# Uncomment and tune to your machine if you want hard guarantees.
# deploy:
# resources:
# reservations:
# cpus: "1.0"
# memory: 512M
# --- PyPlanet controller (our Python 3.12 fork + cup_manager) ---
controller:
# Prebuilt image from GitHub Actions (ghcr.io). `build` is kept as a local
# fallback: `docker compose up -d --build` builds from source instead.
# To use the published image: `docker compose pull && docker compose up -d`.
image: ghcr.io/maferick/tm2020-pyplanet-controller:latest
build:
context: ./controller
restart: unless-stopped
depends_on:
db:
condition: service_healthy
dedicated:
condition: service_started
environment:
DB_HOST: db
DB_NAME: ${DB_NAME:-pyplanet}
DB_USER: ${DB_USER:-pyplanet}
DB_PASSWORD: ${MYSQL_PASSWORD}
DEDICATED_HOST: dedicated
DEDICATED_PORT: "5000"
DEDICATED_PASSWORD: ${XMLRPC_SUPERADMIN}
PYPLANET_OWNERS: ${PYPLANET_OWNERS}
MAP_MATCHSETTINGS: ${MAP_MATCHSETTINGS:-maplist.txt}
volumes:
# Shared with the dedicated server so the controller can read MatchSettings/maps.
- userdata:/server/UserData
volumes:
dbdata:
userdata: