The server side of the videos library (owner review 1, R9): one list of every render, a delete into the archive's trash that is always a dry run first and must give the plan's fingerprint back, and a hash-verified copy into a videos folder as one video-copy job, so the panel and the desktop manage renders without editing anything. - /api/v1/videos: list (filters, sort, paging), get, delete (Delete, audited videos_deleted) and copy (Edit, audited videos_copied; 409 videos_folder_unset, 422 videos_folder_invalid, 507 videos_no_space). - The "videos" capability; format 3 comes from ProjectSettings.CurrentVersion. - Trash routes accept videos-<id>-<ticks> entries; restore goes through the videos library (hash re-check, same render id). - Render DTOs carry sha256 and kind; sent renders and node results record the verified hash and the kind. - VideosPath setting (CHRONOS_VIDEOS_PATH locks it): absolute, outside the archive and the data folder; video-copy gets a priority level. - Docker: /videos volume in compose with CHRONOS_VIDEOS_PATH, folder made in the image (not a VOLUME), entrypoint checks it; Unraid template rows. - .webm, .m4v and .apng served with their media types for the panel player. Refs #21 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
105 lines
6.2 KiB
YAML
105 lines
6.2 KiB
YAML
# Chronos Server with PostgreSQL 17. Start: docker compose up -d Admin panel: http://<host>:8080/admin
|
||
name: chronos
|
||
|
||
services:
|
||
chronos:
|
||
# :latest is the newest stable release (before the first one, the newest pre-release); :<version> pins a release;
|
||
# :nightly is the development version rebuilt every night, not for production.
|
||
# While the organisation on Gitea is private, sign in before pulling: docker login gitea.encke-hake.ts.net
|
||
image: gitea.encke-hake.ts.net/balbosoft/chronos-server:latest
|
||
restart: unless-stopped
|
||
depends_on:
|
||
postgres:
|
||
condition: service_healthy
|
||
# Clients connect to https://<host>:8443, the Client address the admin panel shows (Settings › Network and TLS).
|
||
# Publishing a port as another host port ("18443:8443")? Keep the container port (after the colon) and set
|
||
# CHRONOS_PUBLIC_HTTPS_PORT and CHRONOS_PUBLIC_HTTP_PORT below, or the public ports in the admin panel, to the host
|
||
# ports. LAN discovery reaches clients only with "network_mode: host"; on this bridge network clients type the
|
||
# client address. With host networking drop "ports", give the postgres service
|
||
# ports: ["127.0.0.1:5432:5432"] and set CHRONOS_DB_HOST to 127.0.0.1: the name "postgres" no longer resolves there.
|
||
# The server then listens on the host's 8080 and 8443 itself: if another service uses either, set CHRONOS_HTTP_PORT
|
||
# or CHRONOS_HTTPS_PORT below to a free port and leave the public ports unset.
|
||
ports:
|
||
- "8080:8080"
|
||
- "8443:8443"
|
||
environment:
|
||
CHRONOS_ADMIN_USER: admin
|
||
CHRONOS_ADMIN_PASSWORD: ${CHRONOS_ADMIN_PASSWORD:?set CHRONOS_ADMIN_PASSWORD in .env}
|
||
# postgres (with the CHRONOS_DB_* values below) or a full connection string: Host=…;Database=…;Username=…;Password=…
|
||
CHRONOS_DB: postgres
|
||
CHRONOS_DB_HOST: postgres
|
||
CHRONOS_DB_NAME: chronos
|
||
CHRONOS_DB_USER: chronos
|
||
CHRONOS_DB_PASSWORD: ${CHRONOS_DB_PASSWORD:?set CHRONOS_DB_PASSWORD in .env}
|
||
# auto (self-signed), pem or proxy. Behind a proxy, set CHRONOS_TRUSTED_PROXIES to the proxy's own address (only
|
||
# loopback is trusted otherwise). Give a proxy container a fixed one (ipv4_address, on a network with an ipam
|
||
# subnet that this service joins too) and let it reach Chronos on that network, not through a published port.
|
||
# Never list a subnet or the network's gateway (.1): Docker relays connections to the published ports (IPv6
|
||
# clients, the host) from the gateway, and each of them could then choose its client address. For a proxy on the
|
||
# host itself, run this service with network_mode: host; the proxy then reaches Chronos over loopback.
|
||
CHRONOS_TLS_MODE: auto
|
||
# CHRONOS_TRUSTED_PROXIES: "172.30.0.10"
|
||
# The host ports clients use, when "ports" publishes 8080 and 8443 as others. Set here, the admin panel can no
|
||
# longer change them.
|
||
# CHRONOS_PUBLIC_HTTP_PORT: "8080"
|
||
# CHRONOS_PUBLIC_HTTPS_PORT: "8443"
|
||
# The ports the server listens on, with network_mode: host only (on a bridge network the mapping above decides).
|
||
# CHRONOS_HTTP_PORT: "8080"
|
||
# CHRONOS_HTTPS_PORT: "8443"
|
||
CHRONOS_SERVER_NAME: Chronos Server
|
||
# Jobs run one at a time. Photos the running job processes at once (default: half the cores), and the priority queue
|
||
# (a higher job pauses the running one, which resumes afterwards). Set here, they can no longer be changed in the
|
||
# admin panel's Settings.
|
||
# CHRONOS_PARALLELISM: "4"
|
||
# CHRONOS_PRIORITY_QUEUE: "true"
|
||
# The log files' and the console's level: Trace, Debug, Information, Warning, Error, Critical or None (default
|
||
# Information). Set here, it locks both levels: the admin panel's Settings › Logs can no longer change them.
|
||
# CHRONOS_LOG_LEVEL: Information
|
||
# The log files (/data/logs) and the audit log: the console's own level, the days files are kept, the size (MB) at
|
||
# which a file continues in a numbered one and that of all files (the oldest go beyond it; 0: no limit for either),
|
||
# daily or hourly files, the days the audit log clean-up keeps audit entries (0: forever) and the MB of each log in the
|
||
# diagnostics zip.
|
||
# Set here, they can no longer be changed in the admin panel's Settings › Logs.
|
||
# CHRONOS_LOG_CONSOLE_LEVEL: Warning
|
||
# CHRONOS_LOG_RETENTION_DAYS: "14"
|
||
# CHRONOS_LOG_MAX_FILE_MB: "50"
|
||
# CHRONOS_LOG_MAX_TOTAL_MB: "1024"
|
||
# CHRONOS_LOG_ROTATION: daily
|
||
# CHRONOS_AUDIT_RETENTION_DAYS: "0"
|
||
# CHRONOS_DIAGNOSTICS_LOG_MB: "4"
|
||
# The admin panel shows the archive volume's free space. An Unraid share (/mnt/user/<share>) reports its primary
|
||
# storage, often the cache: map the share's array view to /space (volumes below) and show that one instead.
|
||
# CHRONOS_SPACE_PATH: /space
|
||
# Where "Copy to videos folder" (admin panel › Videos, the desktop's Videos section) copies renders, each checked by
|
||
# hash; the volume below. Set here, the admin panel can no longer change it; remove it (and the volume) to turn
|
||
# copying off. Chronos never deletes what it copied there.
|
||
CHRONOS_VIDEOS_PATH: /videos
|
||
PUID: ${PUID:-1000}
|
||
PGID: ${PGID:-1000}
|
||
TZ: ${TZ:-UTC}
|
||
volumes:
|
||
# The archive folder should belong to PUID:PGID; an empty or root-owned one is given to them at start (the folder
|
||
# only, never its contents).
|
||
- ${CHRONOS_ARCHIVE:-./archive}:/archive
|
||
# Optional, with CHRONOS_SPACE_PATH above: the same share seen on the array only, to show the array's free space.
|
||
# - /mnt/user0/Timelapse:/space:ro
|
||
- ${CHRONOS_DATA:-./data}:/data
|
||
# The videos folder (CHRONOS_VIDEOS_PATH above): copies of renders, flat, " (2)" on a name collision. Outside the
|
||
# archive: a folder inside it is refused.
|
||
- ${CHRONOS_VIDEOS:-./videos}:/videos
|
||
|
||
postgres:
|
||
image: postgres:17
|
||
restart: unless-stopped
|
||
environment:
|
||
POSTGRES_DB: chronos
|
||
POSTGRES_USER: chronos
|
||
POSTGRES_PASSWORD: ${CHRONOS_DB_PASSWORD:?set CHRONOS_DB_PASSWORD in .env}
|
||
volumes:
|
||
- ${CHRONOS_PGDATA:-./pgdata}:/var/lib/postgresql/data
|
||
healthcheck:
|
||
test: ["CMD-SHELL", "pg_isready -U chronos -d chronos"]
|
||
interval: 10s
|
||
timeout: 5s
|
||
retries: 10
|