This commit is contained in:
team3
2026-09-07 17:38:17 +02:00
parent 6478559252
commit 2a9ab4c7da
11 changed files with 521 additions and 125 deletions

33
docker-compose.yml Normal file
View File

@@ -0,0 +1,33 @@
services:
pirate-dice:
build:
context: .
container_name: pirate-dice
restart: unless-stopped
healthcheck:
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health', timeout=5)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
start_interval: 2s
environment:
SPIEL_HOST: pirate-dice.marha.de
PORT_VON: 8911
PORT_BIS: 8940
# Das Spiel spricht UDP. Traefik macht nur HTTP, also müssen die
# Raum-Ports direkt nach aussen.
ports:
- "8911-8940:8911-8940/udp"
networks:
- web
labels:
- "traefik.enable=true"
- "traefik.http.routers.piratedice.rule=Host(`pirate-dice.marha.de`)"
- "traefik.http.routers.piratedice.entrypoints=websecure"
- "traefik.http.routers.piratedice.tls.certresolver=letsencrypt"
- "traefik.http.services.piratedice.loadbalancer.server.port=8000"
networks:
web:
external: true