add .env file to documentation

This commit is contained in:
Marco Realacci 2025-04-10 15:49:04 +02:00
parent 6a5d03f73e
commit 26cc0114c1

View file

@ -26,16 +26,17 @@ or you can use your system's package manager.
| `IMMICH_ALBUM_ID` | The ID of the album to download | | `IMMICH_ALBUM_ID` | The ID of the album to download |
| `IMMICH_DOWNLOAD_PATH` | Directory to save downloaded assets | | `IMMICH_DOWNLOAD_PATH` | Directory to save downloaded assets |
## Usage ## Configuration
You can run the script manually: 1. Copy the files:
```bash ```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 ## Running the script automatically
@ -49,10 +50,7 @@ After=network.target
[Service] [Service]
Type=simple Type=simple
Environment="IMMICH_ALBUM_ID=my-super-cool-album-id" EnvironmentFile=/opt/immich-album-downloader/.env
Environment="IMMICH_API_KEY=averysecretapikeypleasedonotsteal"
Environment="IMMICH_DOWNLOAD_PATH=/home/marco/wallapers/"
Environment="IMMICH_INSTANCE_URL=https://your-immich.instance/api"
ExecStart=/usr/bin/python3 /opt/immich-album-downloader/main.py ExecStart=/usr/bin/python3 /opt/immich-album-downloader/main.py
Restart=no Restart=no