Files
Christoph 7a43db8dd8 feat(sync): enable scheduled asset synchronization mode
This update introduces a persistent background synchronization mode, allowing the external assets container to run continuously and periodically sync albums instead of executing once and exiting. The system now checks a configurable interval, retries on temporary failures, and manages its lifecycle using `time.sleep`.

- Added SYNC_INTERVAL_SECONDS configuration for scheduling
- Updated compose service to restart automatically and loop indefinitely
- Implemented continuous run logic in main function and added corresponding unit tests
2026-07-23 14:04:13 +02:00

25 lines
758 B
YAML

services:
album-sync:
build:
context: .
image: immich-extern-to-album:local
init: true
restart: unless-stopped
environment:
IMMICH_URL: ${IMMICH_URL:?Set IMMICH_URL in .env}
IMMICH_API_KEY: ${IMMICH_API_KEY}
IMMICH_LIBRARY_ID: ${IMMICH_LIBRARY_ID:?Set IMMICH_LIBRARY_ID in .env}
EXTERNAL_ROOT: ${EXTERNAL_ROOT:-/mnt/nextcloud-photos}
ALBUM_MODE: ${ALBUM_MODE:-root}
ALBUM_SEPARATOR: "${ALBUM_SEPARATOR:- - }"
PAGE_SIZE: ${PAGE_SIZE:-1000}
DRY_RUN: ${DRY_RUN:-false}
SYNC_INTERVAL_SECONDS: ${SYNC_INTERVAL_SECONDS:-1800}
extra_hosts:
- "host.docker.internal:host-gateway"
read_only: true
security_opt:
- no-new-privileges:true
cap_drop:
- ALL