Files
Chronos/deploy/docker/docker-compose.yml
T
Alby96andClaude Opus 5.5 8d66be709c fix: one audit retention, scans at start, live deep analysis and a 6-hour upload sweep
Settle what the R10 scheduler and R11 log packages left open when they were
integrated (owner review 2, phase 2).

- Audit retention has one source of truth, the audit-cleanup schedule's age
  limit. AuditRetentionDays defaults to 0 (the audit log is kept forever, so
  an upgrade deletes nothing; the schedule is seeded off) and accepts 0-3650,
  what a schedule's age limit takes. Saving Settings › Logs › Keep audit sets
  the schedule's limit (on with a limit, off at 0) without a restart;
  CHRONOS_AUDIT_RETENTION_DAYS locks it and Reset goes back to it.
- Both hosts scan right after start again, as their polling did: the server
  after the scheduler starts, the desktop once the archive was reopened and
  again when an unplugged one is back. Scheduler.RunSystemNowAsync runs the
  archive-scan schedule when it is enabled and has not run since the start,
  and skips while its scan is pending.
- Desktop scans follow Settings › Analysis › After a scan at every run: a scan
  schedule without its own deep parameter asks the host
  (IScheduleHost.DeepAnalysisAfterScan), the archive-scan schedule no longer
  freezes the setting, and the editor offers deep only for analyses, so the
  setting's tooltip stays true.
- The server's upload clean-up runs every 6 hours instead of every 30
  minutes, to keep the job history readable; idle uploads still expire after
  UploadRetentionHours.
- The Unraid template and docker-compose leave CHRONOS_LOG_LEVEL empty or
  commented out, and say that setting it locks both log levels, so the admin
  panel can change them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 02:51:04 +01:00

88 lines
4.9 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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
# Publishing a port as another host port ("18443:8443")? Set CHRONOS_PUBLIC_HTTPS_PORT (and _HTTP_PORT) below to the
# host port. LAN discovery reaches clients only with "network_mode: host"; on this bridge network clients add the
# server by its 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.
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"
# CHRONOS_PUBLIC_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
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
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