# Portainer-friendly: no build step. Load/push the image first, then paste this stack. # # Cameras are source-only; resolution is a query param (square by default): # http://:8080/doorbell/?size=480 # http://:8080/oprit/?w=720 # http://:8080/oprit/?size=480&zoom=1.35 # # Per-camera "zoom" in CAMERAS also applies when ?zoom= is omitted. # zoom > 1 fills portrait/wide feeds tighter (more crop, larger subject). services: resizer: image: doorbell-resizer:latest container_name: doorbell-resizer ports: - "8080:80" environment: JPEG_QUALITY: "40" FETCH_TIMEOUT: "5" PREFETCH_HZ: "10" PREFETCH_SIZES: "480,720" CAMERAS: >- [ {"name":"doorbell","url":"http://10.0.1.197:5050/api/doorbell/latest.jpg"}, {"name":"oprit","url":"http://10.0.1.197:5050/api/oprit/latest.jpg","zoom":1.35} ] healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1/health')"] interval: 30s timeout: 5s retries: 3 start_period: 15s restart: unless-stopped