Files
av1dae/docker-compose.yml
Esa Kataja 04d6c85712 add: processing controls — start/hold, pause/resume, retry
Three lifecycle controls on the dashboard, sharing one /api surface and the
status feed:

- Start/hold gate (#11): the watcher tracks the queue but holds processing
  until POST /api/start. Held by default; AV1DAE_AUTOSTART=1 restores start-
  on-boot. NOTE: flips the previous auto-start default.
- Pause/resume the active encode (#10): SIGSTOP/SIGCONT on the ffmpeg process
  (libsvtav1 is in-process, so one signal suspends all its threads). Resumes
  exactly where it left off; the tracker excludes paused time from elapsed.
- Retry a failed file (#3): POST /api/retry?file=NAME moves it from failed/
  back to input/, with a base-name guard against path traversal.

/status now reports running + the failed list; snapshots carry a paused flag.
Verified live: held queue, retry move, traversal -> 400, and a real encode
suspending to process state T on pause and S on resume.

Closes #3
Closes #10
Closes #11
2026-06-21 20:38:21 +03:00

24 lines
986 B
YAML

services:
av1dae:
build: .
container_name: av1dae
restart: unless-stopped
# Cap CPU/RAM so a long SVT-AV1 encode can't starve the host. Tune to taste.
# `podman compose` honors deploy.resources; `podman-compose` (python) wants
# the short keys instead — cpus: 4.0 / mem_limit: 4g / cpuset: "0-3".
deploy:
resources:
limits:
cpus: "8.0"
memory: 4g
ports:
- "8080:8080" # status server + dashboard at http://host:8080 (needs http_addr: ":8080" in config)
# By default the queue is HELD on boot — click Start in the UI. Uncomment to auto-start:
# environment:
# - AV1DAE_AUTOSTART=1
volumes:
- ./data/config.yaml:/config/config.yaml:ro # your config — paths inside must point at /data/*
- ./data/media:/data # holds input/ output/ originals/ failed/ work/ + logs
# Uncomment to delete originals after a successful encode (appends -d to the entrypoint):
# command: ["-d"]