chore: production docker + compose for LAN deployment
This commit is contained in:
58
docker-compose.yml
Normal file
58
docker-compose.yml
Normal file
@@ -0,0 +1,58 @@
|
||||
services:
|
||||
# Default service: works on Docker Desktop (Windows/macOS) and Linux.
|
||||
# Exposes HTTP and a *range* of UDP ports for triggers.
|
||||
# Keep your Event UDP ports within this published range.
|
||||
syncplayer:
|
||||
build: .
|
||||
|
||||
ports:
|
||||
- "5000:5000/tcp"
|
||||
# UDP trigger ports (edit range if needed)
|
||||
- "7000-7999:7000-7999/udp"
|
||||
|
||||
environment:
|
||||
# Persistent data root inside container (mounted below)
|
||||
DATA_DIR: /data
|
||||
MEDIA_DIR: /data/media
|
||||
LOG_DIR: /data/logs
|
||||
|
||||
# Flask-SocketIO async backend for Linux containers
|
||||
ASYNC_MODE: eventlet
|
||||
|
||||
# App bind settings (when using host networking, PORT must match gunicorn bind)
|
||||
HOST: 0.0.0.0
|
||||
PORT: 5000
|
||||
|
||||
# Change this in production
|
||||
SECRET_KEY: change-me
|
||||
|
||||
# Keep CORS permissive for LAN kiosk browsers
|
||||
CORS_ORIGINS: "*"
|
||||
|
||||
volumes:
|
||||
- ./data:/data
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
# Optional: host-networked service for Linux hosts.
|
||||
# Use: docker compose --profile hostnet up -d --build
|
||||
# This avoids needing to pre-declare UDP ports (dynamic ports just work).
|
||||
syncplayer-host:
|
||||
profiles: ["hostnet"]
|
||||
build: .
|
||||
network_mode: host
|
||||
|
||||
environment:
|
||||
DATA_DIR: /data
|
||||
MEDIA_DIR: /data/media
|
||||
LOG_DIR: /data/logs
|
||||
ASYNC_MODE: eventlet
|
||||
HOST: 0.0.0.0
|
||||
PORT: 5000
|
||||
SECRET_KEY: change-me
|
||||
CORS_ORIGINS: "*"
|
||||
|
||||
volumes:
|
||||
- ./data:/data
|
||||
|
||||
restart: unless-stopped
|
||||
Reference in New Issue
Block a user