37 lines
1.2 KiB
Markdown
37 lines
1.2 KiB
Markdown
# Pi Servers -- Roadmap
|
|
|
|
## Docker Compose
|
|
|
|
Containerize the pi servers for easier deployment.
|
|
|
|
### Options
|
|
|
|
1. **Single service** -- `run_all.py` as the entrypoint, both servers in one container
|
|
2. **Split services** -- separate containers for `stats_server.py` and `contents_server.py`
|
|
|
|
Single service is simpler. Split services allow independent scaling and restarts.
|
|
|
|
### Configuration
|
|
|
|
- Volume mount `assets/` and `config/alarms.json` so they're editable without rebuilding
|
|
- Expose ports 8765 and 8766
|
|
- Network mode `host` or a bridge with known IPs for ESP32 discovery
|
|
- Restart policy: `unless-stopped`
|
|
|
|
## Repository Extraction
|
|
|
|
The `pi/` directory will become its own git repository.
|
|
|
|
### Steps
|
|
|
|
1. Extract `pi/` into a standalone repo with its own `README.md`, `requirements.txt`, and CI
|
|
2. Add it back to this project as a git submodule
|
|
3. The interface contract between the two repos is the WebSocket protocol -- JSON schemas and binary frame formats documented in `README.md`
|
|
|
|
### Benefits
|
|
|
|
- Independent versioning and release cycle
|
|
- Pi-side contributors don't need the ESP-IDF toolchain
|
|
- CI can test the Python servers in isolation
|
|
- Cleaner separation of concerns between embedded firmware and host services
|