- add multi-device portal device management, key rotation, and sync request APIs - add Pi settings UI for remote server URL, device name, and API key - add local test-connection and sync-now actions - make upload and config sync reuse dynamic shared credentials - add Phase 25.5c migration and docs updates Co-authored-by: Copilot <[email protected]>
52 lines
1.9 KiB
YAML
52 lines
1.9 KiB
YAML
services:
|
|
db:
|
|
image: postgres:17
|
|
container_name: yaris-obd-db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:-yarisobd}
|
|
POSTGRES_USER: ${POSTGRES_USER:-yarisobd}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set a POSTGRES_PASSWORD in .env}
|
|
volumes:
|
|
- ${DATA_DIR:-./data}/postgres:/var/lib/postgresql/data
|
|
- ./sql/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
|
- ./sql/migrate_phase24.sql:/docker-entrypoint-initdb.d/migrate_phase24.sql:ro
|
|
- ./sql/migrate_phase25_5a.sql:/docker-entrypoint-initdb.d/migrate_phase25_5a.sql:ro
|
|
- ./sql/migrate_phase25_5c.sql:/docker-entrypoint-initdb.d/migrate_phase25_5c.sql:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-yarisobd}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
# Not published to the host/LAN on purpose - only reachable from the
|
|
# `api` container over the internal compose network.
|
|
|
|
api:
|
|
build:
|
|
context: ..
|
|
dockerfile: server/Dockerfile
|
|
container_name: yaris-obd-api
|
|
restart: unless-stopped
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
POSTGRES_HOST: db
|
|
POSTGRES_PORT: 5432
|
|
POSTGRES_DB: ${POSTGRES_DB:-yarisobd}
|
|
POSTGRES_USER: ${POSTGRES_USER:-yarisobd}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set a POSTGRES_PASSWORD in .env}
|
|
DASHCAM_STORAGE_DIR: /data/dashcam
|
|
MAX_DASHCAM_UPLOAD_MB: ${MAX_DASHCAM_UPLOAD_MB:-2048}
|
|
SECRET_KEY: ${SECRET_KEY:?set a SECRET_KEY in .env}
|
|
DEVICE_NAME: ${DEVICE_NAME:-yaris-2013}
|
|
volumes:
|
|
- ${DATA_DIR:-./data}/dashcam:/data/dashcam
|
|
ports:
|
|
- "${API_PORT:-8098}:8098"
|
|
healthcheck:
|
|
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8098/health', timeout=3)"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|