chore: production docker + compose for LAN deployment
This commit is contained in:
43
README.md
43
README.md
@@ -107,6 +107,49 @@ Open display pages:
|
||||
|
||||
- `http://<server-ip>:5000/display/<public_id>`
|
||||
|
||||
## Docker (production-ready)
|
||||
|
||||
This repo includes a `Dockerfile` and `docker-compose.yml` suitable for LAN deployments.
|
||||
|
||||
### Docker networking for LAN + UDP triggers
|
||||
|
||||
SyncPlayer listens on **UDP ports configured per Event**.
|
||||
|
||||
Docker has two workable strategies:
|
||||
|
||||
1) **Publish a UDP port range** (works on Docker Desktop + Linux)
|
||||
- The default `syncplayer` service publishes `7000-7999/udp`.
|
||||
- Keep your Event UDP ports within that range.
|
||||
|
||||
2) **Host networking** (Linux only)
|
||||
- Use `docker compose --profile hostnet up -d --build`
|
||||
- Dynamic UDP ports work without pre-declaring a range.
|
||||
- Discovery/casting protocols (mDNS/SSDP/etc.) also work best here.
|
||||
|
||||
In both cases HTTP + Socket.IO is reachable at `http://<host-ip>:5000`.
|
||||
|
||||
### Run
|
||||
|
||||
```bash
|
||||
docker compose up -d --build
|
||||
```
|
||||
|
||||
Data is persisted in `./data/` on the host:
|
||||
|
||||
- `./data/syncplayer.db`
|
||||
- `./data/media/` (uploaded videos + idle image)
|
||||
- `./data/logs/system.log`
|
||||
|
||||
Then open:
|
||||
|
||||
- Admin: `http://<host-ip>:5000/admin/`
|
||||
- Displays: `http://<host-ip>:5000/display/<public_id>`
|
||||
|
||||
### Notes
|
||||
|
||||
- Default Gunicorn configuration runs **1 worker** to avoid starting multiple UDP listeners.
|
||||
- Change `SECRET_KEY` in `docker-compose.yml` for real deployments.
|
||||
|
||||
## UDP trigger
|
||||
|
||||
Configure UDP Port + UDP Payload on an Event in the admin UI. The UDP listener binds ports automatically (refreshes config every 5s).
|
||||
|
||||
Reference in New Issue
Block a user