Creating Controller service which will control WROLPi services, admin, SMART, disks, and status. nginx will fallback to Controller UI when React UI is unavailable (such as during upgrades).

This commit is contained in:
Roland 2025-12-11 18:32:55 -07:00 • committed by lrnselfreliance
parent 344fe9035f
commit b9158b60fe
66 changed files with 9920 additions and 327 deletions

View file

@ -14,9 +14,40 @@ services:
volumes:
- ./pg_data:/var/lib/postgresql/data
controller: # WROLPi Controller Service
build:
context: .
dockerfile: docker/controller/Dockerfile
container_name: wrolpi-controller
restart: unless-stopped
ports:
- "8087:8087"
volumes:
# Controller code (for development hot-reload)
- ./controller:/app/controller
# Docker socket for container management
- /var/run/docker.sock:/var/run/docker.sock
# Host system info (read-only)
- /proc:/host/proc:ro
- /sys:/host/sys:ro
# Config directory
- ${MEDIA_DIRECTORY:-./test}/config:/media/wrolpi/config
environment:
- DOCKERIZED=true
- MEDIA_DIRECTORY=/media/wrolpi
# Override CMD to enable auto-reload for development
command: ["uvicorn", "controller.main:app", "--host", "0.0.0.0", "--port", "8087", "--reload", "--reload-dir", "/app/controller"]
healthcheck:
test: [ 'CMD-SHELL', 'curl -f http://127.0.0.1:8087/api/health || exit 1' ]
interval: 30s
timeout: 5s
start_period: 10s
retries: 3
api:
depends_on:
- db
- controller
build:
context: .
dockerfile: docker/api/Dockerfile