24 lines
829 B
YAML
24 lines
829 B
YAML
# Portainer: Stacks → Add stack → upload this file + Dockerfile/app.py/requirements.txt
|
|
# (Web editor alone can't build; use Git stack or pre-built image — see notes below.)
|
|
services:
|
|
resizer:
|
|
build: .
|
|
image: doorbell-resizer:latest
|
|
container_name: doorbell-resizer
|
|
ports:
|
|
- "8080:80"
|
|
environment:
|
|
# Reachable from the Portainer host (LAN IP or Docker DNS if same compose network)
|
|
FRIGATE_URL: http://10.0.1.197:5050/api/doorbell/latest.jpg?h=270
|
|
TARGET_WIDTH: "480"
|
|
JPEG_QUALITY: "40"
|
|
FETCH_TIMEOUT: "5"
|
|
PREFETCH_HZ: "10"
|
|
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
|