feat: Initial nfs setup.

This commit is contained in:
2025-03-19 22:59:29 -04:00
parent e904bf0755
commit 81c27e4988
2 changed files with 22 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
@@ -64,7 +64,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;
@@ -86,4 +86,22 @@ services:
restart: unless-stopped
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
# driver_opts:
# type: nfs
# o: "addr=${NFS_URL},soft,nolock,rw"
# device: "${DB_DATA_LOCATION}"
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