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
17 lines
551 B
Bash
17 lines
551 B
Bash
# Use host.docker.internal when Immich publishes port 2283 on the Docker host.
|
|
IMMICH_URL=http://host.docker.internal:2283
|
|
IMMICH_API_KEY=replace-with-your-api-key
|
|
IMMICH_LIBRARY_ID=replace-with-your-library-id
|
|
|
|
# This must match the beginning of originalPath returned by Immich.
|
|
EXTERNAL_ROOT=/mnt/nextcloud-photos
|
|
ALBUM_MODE=root
|
|
# ALBUM_SEPARATOR=" - "
|
|
PAGE_SIZE=1000
|
|
|
|
# Start with true to verify the planned album assignments without changes.
|
|
DRY_RUN=true
|
|
|
|
# Keep the container running and synchronize every 30 minutes.
|
|
SYNC_INTERVAL_SECONDS=1800
|