nfs-volumes #1

Merged
michael merged 2 commits from nfs-volumes into main 2025-03-20 16:09:15 +00:00
2 changed files with 33 additions and 6 deletions

View File

@@ -18,7 +18,7 @@ services:
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- immich-uploads:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
@@ -28,6 +28,9 @@ services:
- redis
- database
restart: unless-stopped
networks:
- proxy
- backend
healthcheck:
disable: false
@@ -44,6 +47,8 @@ services:
env_file:
- .env
restart: unless-stopped
networks:
- backend
healthcheck:
disable: false
@@ -52,6 +57,8 @@ services:
image: docker.io/redis:6.2-alpine@sha256:148bb5411c184abd288d9aaed139c98123eeb8824c5d3fce03cf721db58066d8
healthcheck:
test: redis-cli ping || exit 1
networks:
- backend
restart: unless-stopped
database:
@@ -64,7 +71,7 @@ services:
POSTGRES_INITDB_ARGS: '--data-checksums'
volumes:
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
- immich-database:/var/lib/postgresql/data
healthcheck:
test: >-
pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1;
@@ -84,6 +91,28 @@ services:
-c shared_buffers=512MB
-c wal_compression=on
restart: unless-stopped
networks:
- backend
networks:
proxy:
external: true
backend:
external: true
volumes:
model-cache:
model-cache: {}
immich-uploads:
driver: local
driver_opts:
type: nfs
o: "addr=${NFS_URL},soft,nolock,rw"
device: "${UPLOAD_LOCATION}"
labels:
dev.housh.description: "Immich upload volume."
immich-database:
driver: local
labels:
dev.housh.description: "Immich database volume."

View File

@@ -1,9 +1,7 @@
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
# The location where your uploaded files are stored
UPLOAD_LOCATION=/media/immich/library
# The location where your database files are stored
DB_DATA_LOCATION=/media/immich/db
UPLOAD_LOCATION=":/var/nfs/path/to/photo/library"
# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
# TZ=Etc/UTC