Clean up server architecture for multi-instance deployment
- Remove main_cycling.py, main_multi.py, main_release.py (single main.py is canonical) - Update setup.sh to read SERVICE_NAME and PORT from .env - Update env.example with SERVICE_NAME and PORT for multi-instance support - Fix server-csi to try rpicam-still before libcamera-still (Debian Trixie) Deploy pattern: clone repo twice, configure each .env, run setup.sh Each instance gets its own systemd service and install directory.
This commit is contained in:
@@ -6,12 +6,20 @@
|
||||
# API Key for authentication (generate with: python3 -c 'import secrets; print(secrets.token_urlsafe(32))')
|
||||
API_KEY=your-secret-key-here
|
||||
|
||||
# Camera identifier (used in events)
|
||||
# Camera identifier (used in events and API responses)
|
||||
CAMERA_ID=basement
|
||||
|
||||
# ============ Service Settings ============
|
||||
|
||||
# Service name for systemd (allows multiple instances)
|
||||
SERVICE_NAME=vixy-vision-basement
|
||||
|
||||
# Port to run on (each instance needs unique port)
|
||||
PORT=8443
|
||||
|
||||
# ============ Camera Settings ============
|
||||
|
||||
# Camera device index (0 = first USB camera)
|
||||
# Camera device index (0 = /dev/video0, 2 = /dev/video2, etc.)
|
||||
CAMERA_INDEX=0
|
||||
|
||||
# Resolution (camera will use closest supported)
|
||||
@@ -40,8 +48,8 @@ MOTION_INTERVAL=0.5
|
||||
|
||||
# ============ Event Collector ============
|
||||
|
||||
# URL to POST motion events to (on Mac mini)
|
||||
COLLECTOR_URL=http://192.168.1.50:8780/events
|
||||
# URL to POST motion events to (collector on Mac mini)
|
||||
COLLECTOR_URL=http://macmini.local:8780/events
|
||||
|
||||
# API key for collector (optional)
|
||||
COLLECTOR_API_KEY=
|
||||
|
||||
Reference in New Issue
Block a user