feat: add immich

This commit is contained in:
lingkai5wu committed 2026-08-14 21:54:04 +08:00
1 parent 5af63ab42e
commit 8e2760b77a
2 files changed
+109

No files matched your search

+87
View File
@@ -0,0 +1,87 @@
name: immich
services:
immich-server:
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
container_name: immich-server
depends_on:
- database
- redis
volumes:
- ${UPLOAD_LOCATION}:/data
- /etc/localtime:/etc/localtime:ro
# External librariey
- type: bind
source: /mnt/toshiba/media_library
target: /external/toshiba
bind:
create_host_path: false
env_file:
- .env
ports:
- '0.0.0.0:2283:2283'
restart: unless-stopped
healthcheck:
disable: false
deploy:
resources:
limits:
cpus: "3.0"
memory: 4G
reservations:
cpus: "0.5"
memory: 512M
devices:
- /dev/dri:/dev/dri
# immich-machine-learning:
# container_name: immich-machine-learning
# image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
# volumes:
# - /srv/data/immich/model-cache:/cache
# env_file:
# - .env
# restart: unless-stopped
# healthcheck:
# disable: false
# deploy:
# resources:
# limits:
# cpus: "2.0"
# memory: 4G
database:
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23
container_name: immich-postgres
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: --data-checksums
ports:
- '127.0.0.1:5432:5432'
restart: unless-stopped
healthcheck:
disable: false
deploy:
resources:
limits:
cpus: "1.0"
memory: 1G
reservations:
cpus: "0.2"
memory: 128M
shm_size: 128mb
redis:
image: docker.io/valkey/valkey:9@sha256:8e8d64b405ce18f41b8e5ee20aa4687a8ed0022d1298f2ce31cdcf3a76e09411
container_name: immich-redis
restart: unless-stopped
healthcheck:
test: redis-cli ping || exit 1
deploy:
resources:
limits:
cpus: "0.5"
memory: 512M
reservations:
cpus: "0.1"
memory: 64M
+22
View File
@@ -0,0 +1,22 @@
# You can find documentation for all the supported env variables at https://docs.immich.app/install/environment-variables
# The location where your uploaded files are stored
UPLOAD_LOCATION=/srv/data/immich
# The location where your database files are stored. Network shares are not supported for the database
DB_DATA_LOCATION=/srv/var/immich/postgres
# 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=Asia/Shanghai
# The Immich version to use. You can pin this to a specific version like "v2.1.0"
IMMICH_VERSION=v3
# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=postgres
# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich