The image now starts through docker-entrypoint.sh: as root it hands /data and the backup folder to PUID:PGID (only files owned by someone else, so restarts stay fast), applies UMASK, and runs Canon as that user with su-exec. Started with --user, it runs Canon directly. The image defaults to 1000:1000; the Compose file presets Unraid's 99:100. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
name: canon
|
|
|
|
# Works with a plain `docker compose up -d --build` and with Arcane's Git sync
|
|
# (Pull). Arcane pulls this file's whole directory, so the build context is
|
|
# the repository itself.
|
|
|
|
services:
|
|
canon:
|
|
build:
|
|
context: .
|
|
args:
|
|
VERSION: ${CANON_VERSION:-dev}
|
|
image: canon:latest
|
|
# Never look for canon:latest on a registry: every deploy (including
|
|
# Arcane's "Pull image" / "Redeploy after sync") builds from the source
|
|
# that was just synced.
|
|
pull_policy: build
|
|
container_name: canon
|
|
restart: unless-stopped
|
|
ports:
|
|
- "${CANON_BIND:-0.0.0.0}:${CANON_PUBLISH_PORT:-4242}:4242"
|
|
volumes:
|
|
# A named volume by default, so a Git sync never touches the database.
|
|
# Set CANON_DATA_PATH to a host folder (e.g. ./data) to keep it there.
|
|
- ${CANON_DATA_PATH:-canon-data}:/data
|
|
# Backups get their own mount so they can live somewhere else, like a
|
|
# NAS share. Set CANON_BACKUP_PATH to a host folder to use one.
|
|
- ${CANON_BACKUP_PATH:-canon-backups}:/backups
|
|
environment:
|
|
CANON_BACKUP_DIR: /backups
|
|
# Who owns the files Canon writes. 99:100 is Unraid's nobody:users;
|
|
# use 1000:1000 (or your own `id -u`:`id -g`) elsewhere.
|
|
PUID: ${PUID:-99}
|
|
PGID: ${PGID:-100}
|
|
UMASK: ${UMASK:-022}
|
|
env_file:
|
|
- path: .env
|
|
required: false
|
|
networks:
|
|
- chromanet
|
|
|
|
volumes:
|
|
canon-data:
|
|
canon-backups:
|
|
|
|
networks:
|
|
chromanet:
|
|
external: true
|