Salvoxia / immich-folder-album-creator

Automatically create and populate albums in Immich from a folder structure in external libraries
https://hub.docker.com/r/salvoxia/immich-folder-album-creator
222 stars 13 forks source link

Manual run from composed service #14

Closed Glideh closed 5 months ago

Glideh commented 5 months ago

If my service is configured on the compose stack to run CRONly like:

  immich-folder-album-creator:
    container_name: immich_folder_album_creator
    image: salvoxia/immich-folder-album-creator:latest
    restart: unless-stopped
    environment:
      API_URL: http://immich_server:3001/api
      API_KEY: YQTOPW6MEY4SLPC37LyXrbtuXoULt6Hl1F9DYoePXw
      ROOT_PATH: /volume1/Photos
      CRON_EXPRESSION: "0 0 * * *"
      TZ: Europe/Paris

Is there a way to run the job manually ?

Glideh commented 5 months ago

Yes with

compose exec immich-folder-album-creator /script/immich_auto_album.sh

One can also keep the config as a non running service with profiles: [donotstart]

  immich-folder-album-creator:
    container_name: immich_folder_album_creator
    image: salvoxia/immich-folder-album-creator:latest
#[...]
    profiles:
      - donotstart

and use it only manually

compose run --rm immich-folder-album-creator /script/immich_auto_album.sh