Files
Chronos/deploy/docker/docker-compose.yml
T
Alby96andClaude Opus 5.5 369e754bec fix(server): public ports as settings, container port lock and client address; clients default to 8443 and name non-Chronos servers
The owner's Uploader could not connect: the panel showed the container's
listening ports (8080/8443) as if clients used them, the public ports were
only environment variables (CHRONOS_PUBLIC_HTTP_PORT not even in the Unraid
template), and the clients mapped a bare host to 443, where another service
answered.

- Public HTTP/HTTPS ports are settings (server.json, or locked by
  CHRONOS_PUBLIC_*) and apply at once; ServerSettingsDto gains appended
  PublicHttpPort, PublicHttpsPort and InContainer members.
- In a container the listening ports are fixed by the template: locked in the
  panel, and saved values from earlier versions are ignored with a warning.
- Settings > Network and TLS shows the client address with a Copy button; the
  discovery tooltip says a container needs network type Host.
- ChronosAddress (shared by Chronos and the Uploader): no scheme and no port is
  https on 8443, https:// keeps 443, a typed port is kept, IPv6 is bracketed.
- GetInfoAsync throws NotChronosServerException for answers that are not a
  Chronos server; another service's certificate is never offered for trust
  and no credentials are sent to it. Both clients name the address asked.
- Unraid template, compose file, user guide, README, BRIEF, DECISIONS,
  CHANGELOG (with an Unraid upgrade note) and ARCHITECTURE updated; en/it
  strings added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 09:53:49 +01:00

93 lines
5.3 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
# 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.
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"
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