Skip to content

Commit 8166163

Browse files
committed
feat: add immich service
1 parent 7ac45aa commit 8166163

File tree

2 files changed

+157
-0
lines changed

2 files changed

+157
-0
lines changed

public/svgs/immich.svg

Lines changed: 66 additions & 0 deletions
Loading

templates/compose/immich.yaml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# documentation: https://immich.app/docs/overview/introduction
2+
# slogan: Self-hosted photo and video management solution.
3+
# tags: photo,video,management,server,cloud,storage,sharing,metadata,face,recognition
4+
# logo: svgs/immich.svg
5+
# port: 2283
6+
7+
name: immich
8+
9+
x-shared-env: &shared-env
10+
environment:
11+
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
12+
13+
# Hardcoded values, not editable in Coolify UI
14+
- UPLOAD_LOCATION=./library # The location where your uploaded files are stored
15+
- DB_DATA_LOCATION=./postgres # The location where your database files are stored
16+
17+
# Uninitialized variables, editable in Coolify UI
18+
- IMMICH_VERSION=${IMMICH_VERSION:-release} # The Immich version to use, editable in Coolify
19+
20+
# Default values, editable in Coolify UI
21+
- DB_PASSWORD=${DB_PASSWORD:-postgres} # Default: "postgres", can be overridden
22+
- DB_USERNAME=${DB_USERNAME:-postgres} # Default: "postgres", can be overridden
23+
- DB_DATABASE_NAME=${DB_DATABASE_NAME:-immich} # Default: "immich", can be overridden
24+
25+
# Optional timezone variable, uninitialized, editable in Coolify UI\
26+
- TZ=${TZ:-Etc/UTC}
27+
28+
services:
29+
immich-server:
30+
container_name: immich_server
31+
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
32+
# extends:
33+
# file: hwaccel.transcoding.yml
34+
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
35+
volumes:
36+
# 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
37+
- ${UPLOAD_LOCATION}:/usr/src/app/upload
38+
- /etc/localtime:/etc/localtime:ro
39+
<<: *shared-env
40+
ports:
41+
- 2283:3001
42+
depends_on:
43+
- redis
44+
- database
45+
restart: always
46+
healthcheck:
47+
disable: false
48+
49+
immich-machine-learning:
50+
container_name: immich_machine_learning
51+
# For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
52+
# Example tag: ${IMMICH_VERSION:-release}-cuda
53+
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
54+
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
55+
# file: hwaccel.ml.yml
56+
# service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
57+
volumes:
58+
- model-cache:/cache
59+
<<: *shared-env
60+
restart: always
61+
healthcheck:
62+
disable: false
63+
64+
redis:
65+
container_name: immich_redis
66+
image: docker.io/redis:6.2-alpine@sha256:2d1463258f2764328496376f5d965f20c6a67f66ea2b06dc42af351f75248792
67+
healthcheck:
68+
test: redis-cli ping || exit 1
69+
restart: always
70+
71+
database:
72+
container_name: immich_postgres
73+
image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
74+
environment:
75+
POSTGRES_PASSWORD: ${DB_PASSWORD}
76+
POSTGRES_USER: ${DB_USERNAME}
77+
POSTGRES_DB: ${DB_DATABASE_NAME}
78+
POSTGRES_INITDB_ARGS: '--data-checksums'
79+
volumes:
80+
# 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
81+
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
82+
healthcheck:
83+
test: pg_isready --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
84+
interval: 5m
85+
start_interval: 30s
86+
start_period: 5m
87+
command: ["postgres", "-c", "shared_preload_libraries=vectors.so", "-c", 'search_path="$$user", public, vectors', "-c", "logging_collector=on", "-c", "max_wal_size=2GB", "-c", "shared_buffers=512MB", "-c", "wal_compression=on"]
88+
restart: always
89+
90+
volumes:
91+
model-cache:

0 commit comments

Comments
 (0)