No description
- Shell 69.9%
- Dockerfile 30.1%
|
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
|
||
|---|---|---|
| elodie@4494ff8514 | ||
| .containerignore | ||
| .gitmodules | ||
| .woodpecker.yaml | ||
| config.ini | ||
| Containerfile | ||
| entrypoint.sh | ||
| README.md | ||
elodie
Container wrapper for elodie that runs photo imports on a recurring schedule via Incus.
Quick start
Build and import the image:
podman build -t elodie .
podman save elodie | incus image import - --alias elodie
Launch the container:
incus launch elodie elodie \
--config environment.ELODIE_INTERVAL=3600 \
--config environment.ELODIE_IMPORT_FLAGS="--trash"
Attach storage:
incus config device add elodie source disk \
source=/path/to/incoming path=/data/source readonly=true
incus config device add elodie destination disk \
source=/path/to/photos path=/data/destination
incus config device add elodie state disk \
source=/path/to/elodie-state path=/data/state
Restart to pick up the devices:
incus restart elodie
Configuration
Configuration is via environment variables set on the Incus container.
| Variable | Default | Description |
|---|---|---|
ELODIE_INTERVAL |
3600 |
Seconds between import runs |
ELODIE_IMPORT_FLAGS |
Extra flags passed to elodie.py import |
|
ELODIE_MAPQUEST_KEY |
MapQuest API key for geolocation lookups |
Update a variable on a running container:
incus config set elodie environment.ELODIE_INTERVAL=1800
incus restart elodie
Import flags
Useful values for ELODIE_IMPORT_FLAGS:
--trash-- move source files to trash after import--allow-duplicates-- reimport files already in the hash database--album-from-folder-- use the source folder name as the album--debug-- verbose output--dry-run-- log what would happen without making changes
Combine them: --config environment.ELODIE_IMPORT_FLAGS="--trash --album-from-folder".
Elodie config file
Optional. Place a config.ini in the state volume before first launch (needed
only for MapQuest geolocation). See config.ini-sample in the elodie source.
Storage
| Mount | Path in container | Purpose |
|---|---|---|
| source | /data/source |
Incoming/unsorted photos (read-only) |
| destination | /data/destination |
Organized photo library |
| state | /data/state |
Elodie hash DB, location cache, config |
Logs
incus console --show-log elodie
Rebuilding
podman build -t elodie .
podman save elodie | incus image import - --alias elodie --force
incus rebuild elodie elodie