docker-compose.yml
Rama master · réplica de lectura del repositorio original.
# Updates replace this file. Settings go in `.env` (see `.env.example`), everything else in a
# `docker-compose.override.yml`. Bump SDVD_COMPOSE_REV on every change here.
services:
# Main game server
server:
image: sdvd/server:${IMAGE_VERSION:-latest}
container_name: sdvd-server
stdin_open: true
tty: true
ports:
# HTTP surfaces. With PUBLIC_HOST set the server sits behind a reverse proxy, so plain
# HTTP binds to loopback only (docs: operations/reverse-proxy.md).
- "${PUBLIC_HOST:+127.0.0.1:}${VNC_PORT:-5800}:5800"
- "${PUBLIC_HOST:+127.0.0.1:}${API_PORT:-8080}:${API_PORT:-8080}"
# Steam relay ports (used by GameServer.Init for relay network)
- "${GAME_PORT:-24642}:24642/udp"
- "${QUERY_PORT:-27015}:27015/udp"
volumes:
- game-data:/data/game
- saves:/config/xdg/config/StardewValley
- ./.local-container/settings:/data/settings
- ./diagnostics:/data/diagnostics
environment:
- SDVD_COMPOSE_REV=4
- STEAM_AUTH_URL=http://steam-auth:${STEAM_AUTH_PORT:-3001}
- SETTINGS_PATH=/data/settings/server-settings.json
- USER_ID=${USER_ID:-1000}
- GROUP_ID=${GROUP_ID:-1000}
- VNC_PASSWORD
- SERVER_NAME
- ALLOW_INSECURE_SETUP
- SERVER_TPS
- SERVER_FPS
- AUTO_SLEEP_GRACE_SECONDS
- SDVD_TPS_AGNOSTIC_PACING
- API_ENABLED
- API_PORT
- API_KEY
- SERVER_PASSWORD
- MAX_LOGIN_ATTEMPTS
- AUTH_TIMEOUT_SECONDS
- ENABLE_MOD_INCOMPATIBLE_OPTIMIZATIONS
- HEALTH_CHECK_SECONDS
- CROP_SAVER_LIGHTNING_IMMUNITY
- VERBOSE_LOGGING
depends_on:
steam-auth:
condition: service_healthy
restart: unless-stopped
steam-auth:
image: sdvd/steam-service:${IMAGE_VERSION:-latest}
container_name: sdvd-steam-auth
stdin_open: true
tty: true
expose:
- "${STEAM_AUTH_PORT:-3001}"
volumes:
- steam-session:/data/steam-session
- game-data:/data/game
environment:
- PORT=${STEAM_AUTH_PORT:-3001}
- USER_ID=${USER_ID:-1000}
- GROUP_ID=${GROUP_ID:-1000}
- STEAM_USERNAME
- STEAM_PASSWORD
- STEAM_REFRESH_TOKEN
- STEAM_KEEP_LANGUAGES
- VALIDATE_ON_BOOT
restart: unless-stopped
# Discord bot for server status display and chat relay
discord-bot:
image: sdvd/discord-bot:${IMAGE_VERSION:-latest}
container_name: sdvd-discord-bot
environment:
- API_URL=http://server:${API_PORT:-8080}
- DISCORD_BOT_TOKEN
- DISCORD_CHAT_CHANNEL
- STATUS_DASHBOARD_CHANNEL
- STATUS_DASHBOARD_REFRESH_RATE
# Must match the server's API_KEY
- API_KEY
volumes:
# Dashboard ownership state (persists the dashboard message across restarts)
- discord-bot-data:/data
depends_on:
- server
# on-failure: won't restart when the bot stops on purpose (exit 0: token unset, bad token, missing intent), will restart on crashes
restart: on-failure
# Optional HTTPS proxy for the API and VNC web UI (docs: operations/reverse-proxy.md).
proxy:
image: caddy:2.11
container_name: sdvd-proxy
profiles: ["proxy"]
command: ["caddy", "run", "--config", "/etc/caddy/Caddyfile.${PROXY_ROUTING:-path}", "--adapter", "caddyfile"]
ports:
- "80:80" # Let's Encrypt validation
- "443:443"
volumes:
- ./docker/proxy:/etc/caddy:ro
- proxy-data:/data
environment:
# Interpolation runs before profile filtering, so no `:?` guard here; Caddy refuses
# to start on an empty site address instead.
- PUBLIC_HOST
- SERVER_URL_NAME
- API_PORT
depends_on:
- server
restart: unless-stopped
volumes:
steam-session:
game-data:
saves:
discord-bot-data:
proxy-data: