From 26cc0114c1aa23f6b35e126192f9fad79bc442a2 Mon Sep 17 00:00:00 2001 From: Marco Realacci Date: Thu, 10 Apr 2025 15:49:04 +0200 Subject: [PATCH] add .env file to documentation --- README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 526cd1d..9d5b94d 100644 --- a/README.md +++ b/README.md @@ -26,16 +26,17 @@ or you can use your system's package manager. | `IMMICH_ALBUM_ID` | The ID of the album to download | | `IMMICH_DOWNLOAD_PATH` | Directory to save downloaded assets | -## Usage +## Configuration -You can run the script manually: +1. Copy the files: ```bash -python3 main.py +sudo mkdir /opt/immich-album-downloader +sudo cp main.py /opt/immich-album-downloader/main.py +sudo cp .env.template /opt/immich-album-downloader/.env ``` -Or set it up as a `systemd` service for automatic and scheduled execution. - +2. Modify `/opt/immich-album-downloader/.env` accordingly --- ## Running the script automatically @@ -49,10 +50,7 @@ After=network.target [Service] Type=simple -Environment="IMMICH_ALBUM_ID=my-super-cool-album-id" -Environment="IMMICH_API_KEY=averysecretapikeypleasedonotsteal" -Environment="IMMICH_DOWNLOAD_PATH=/home/marco/wallapers/" -Environment="IMMICH_INSTANCE_URL=https://your-immich.instance/api" +EnvironmentFile=/opt/immich-album-downloader/.env ExecStart=/usr/bin/python3 /opt/immich-album-downloader/main.py Restart=no