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