feat(immich): support read-only external libraries

Add immich_external_libraries variable to mount host paths into the
server container, intended for use with Immich's External Libraries
feature. Mounts are read-only; the in-container mount_path must be
used when registering the library in the Immich UI.
This commit is contained in:
Clément Désiles
2026-05-30 23:39:17 +02:00
parent b0324cf3fe
commit 30dfb9ee8b
3 changed files with 27 additions and 0 deletions
+7
View File
@@ -13,6 +13,13 @@ Both passwords must be set in your inventory (min 12 characters):
- `immich_postgres_password` - PostgreSQL database password - `immich_postgres_password` - PostgreSQL database password
- `immich_valkey_password` - Valkey/Redis password - `immich_valkey_password` - Valkey/Redis password
## External Libraries
Mount host paths read-only into the server container via `immich_external_libraries`,
then add the in-container `mount_path` in the Immich UI
(Administration → External Libraries). The `{{ ansible_user }}` running the rootless
pod must have read access on the host path.
## Troubleshooting ## Troubleshooting
### Valkey ACL Issues ### Valkey ACL Issues
+9
View File
@@ -5,6 +5,15 @@ immich_version: release
# Storage location (@see https://docs.immich.app/install/environment-variables/) # Storage location (@see https://docs.immich.app/install/environment-variables/)
immich_upload_location: "{{ podman_projects_dir }}/immich/data/upload" immich_upload_location: "{{ podman_projects_dir }}/immich/data/upload"
# External libraries (read-only host paths exposed to the server container)
# Use the in-container `mount_path` when registering the library in the Immich UI.
# Example:
# immich_external_libraries:
# - name: clement-photos
# host_path: /mnt/andromeda/clement-photos
# mount_path: /mnt/external/clement-photos
immich_external_libraries: []
# PostgreSQL configuration (REQUIRED password - must be set explicitly) # PostgreSQL configuration (REQUIRED password - must be set explicitly)
immich_postgres_db_name: immich immich_postgres_db_name: immich
immich_postgres_user: immich immich_postgres_user: immich
+11
View File
@@ -45,6 +45,11 @@ spec:
readOnly: true readOnly: true
- name: immich-data - name: immich-data
mountPath: /data mountPath: /data
{% for lib in immich_external_libraries %}
- name: ext-{{ lib.name }}
mountPath: {{ lib.mount_path }}
readOnly: true
{% endfor %}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /api/server/ping path: /api/server/ping
@@ -83,6 +88,12 @@ spec:
hostPath: hostPath:
path: {{ immich_upload_location }} path: {{ immich_upload_location }}
type: Directory type: Directory
{% for lib in immich_external_libraries %}
- name: ext-{{ lib.name }}
hostPath:
path: {{ lib.host_path }}
type: Directory
{% endfor %}
- name: model-cache - name: model-cache
persistentVolumeClaim: persistentVolumeClaim:
claimName: immich-model-cache claimName: immich-model-cache