Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (89 loc) · 3.36 KB
/
Copy pathdocker-compose.yml
File metadata and controls
93 lines (89 loc) · 3.36 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
88
89
90
91
92
93
# Usurper Reborn — Docker Compose
#
# Usage:
# docker compose up -d Start all services
# docker compose logs -f usurper-game Follow game server logs
# docker compose down Stop all services
#
# Game server listens on port 4000 (raw TCP) for BBS/MUD client connections.
# Web interface available on port 80 (browser play + dashboards).
#
# Customize (DO THIS BEFORE EXPOSING THE SERVER TO A NETWORK):
# - Replace "YourAdminName" with your admin username
# - Set BALANCE_PASS to a real password. It is deliberately NOT set below:
# the admin dashboard (which fronts world-wipe, bans, and player edits)
# refuses every route except change-password while the shipped default
# password is still active, so an unconfigured deploy cannot be nuked by
# anyone who read this file. Setting BALANCE_PASS=changeme counts as
# unconfigured and stays locked.
# - Mount your own index.html: ./my-landing.html:/opt/usurper/web/index.html
services:
usurper-game:
build: .
ports:
- "4000:4000"
volumes:
- usurper-data:/var/usurper
command:
- "--mud-server"
- "--mud-port"
- "4000"
- "--db"
- "/var/usurper/usurper_online.db"
- "--log-stdout"
- "--auto-provision"
- "--sim-interval"
- "30"
- "--admin"
- "YourAdminName"
# The web proxy opens the database once at startup and never reconnects, so
# it must not start before the game server has created the file.
healthcheck:
test: ["CMD", "test", "-f", "/var/usurper/usurper_online.db"]
interval: 5s
timeout: 3s
retries: 24
start_period: 10s
restart: unless-stopped
usurper-web:
build:
context: .
dockerfile: docker/web/Dockerfile
volumes:
- usurper-data:/var/usurper
environment:
- MUD_MODE=1
- WEB_BIND_HOST=0.0.0.0 # nginx reaches this container by service name; only nginx is published
- MUD_HOST=usurper-game
- MUD_PORT=4000 # must match --mud-port above (the proxy's own default is 4001)
- DB_PATH=/var/usurper/usurper_online.db
- BALANCE_USER=admin
# Set a real password here before exposing this deploy. Leaving it unset
# (or setting it to 'changeme') keeps the admin dashboard locked to the
# change-password flow only. See the header comment.
# - BALANCE_PASS=pick-something-long-and-unique
# SSH gateway account used only when MUD_MODE=0 (legacy SSH hop).
# - SSH_USER=usurper
# - SSH_PASS=set-a-real-one
# Optional integrations (all off when unset); see DOCS/DOCKER.md.
# - WS_MAX_CONN_PER_IP=8 # browser sessions allowed per client IP
# - BUG_REPORT_WEBHOOK_URL= # Discord webhook that receives in-game /bug reports
# - DISCORD_BOT_TOKEN= # with DISCORD_GOSSIP_CHANNEL_ID: mirror world news to Discord
# - DISCORD_GOSSIP_CHANNEL_ID=
# - DISCORD_STATS_CHANNEL_ID= # optional live stats embed
# - GITHUB_PAT= # read-only token for the sponsors list on the landing page
depends_on:
usurper-game:
condition: service_healthy
restart: unless-stopped
usurper-nginx:
build:
context: .
dockerfile: docker/nginx/Dockerfile
ports:
- "80:80"
depends_on:
- usurper-web
restart: unless-stopped
volumes:
usurper-data: