From 118fb4efb2e2566aadd89fe4c49761439b64d56c Mon Sep 17 00:00:00 2001 From: Wheelz Date: Tue, 19 May 2026 15:44:56 -0500 Subject: [PATCH] First commit --- immich-compose.yml | 92 ++++++++++++++++++++++++++++++++++++++++++++++ immich.env.example | 7 ++++ 2 files changed, 99 insertions(+) create mode 100644 immich-compose.yml create mode 100644 immich.env.example diff --git a/immich-compose.yml b/immich-compose.yml new file mode 100644 index 0000000..fc36e4b --- /dev/null +++ b/immich-compose.yml @@ -0,0 +1,92 @@ +# Immich - Self-Hosted Photo & Video Manager +# https://docs.immich.app +# Usage: docker compose up -d + +name: immich + +services: + immich-server: + container_name: immich_server + image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION} + restart: unless-stopped + volumes: + - ${UPLOAD_LOCATION}:/usr/src/app/upload + - /etc/localtime:/etc/localtime:ro + # Optional: Mount an existing photo library as a read-only external library + # - ${EXTERNAL_LIBRARY_PATH}:/mnt/external:ro + env_file: + - .env + ports: + - "2283:2283" + depends_on: + postgres: + condition: service_healthy + redis: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:2283/api/server/ping || exit 1"] + interval: 30s + timeout: 10s + retries: 5 + start_period: 60s + networks: + - immich-net + + immich-machine-learning: + container_name: immich_machine_learning + # For hardware-accelerated ML inference, see: + # https://docs.immich.app/features/ml-hardware-acceleration + image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION} + restart: unless-stopped + volumes: + - ${MODEL_CACHE}:/cache + env_file: + - .env + healthcheck: + test: ["CMD-SHELL", "python3 -c \"import urllib.request; urllib.request.urlopen('http://localhost:3003/ping')\" || exit 1"] + interval: 30s + timeout: 10s + retries: 5 + start_period: 60s + networks: + - immich-net + + redis: + container_name: immich_redis + image: docker.io/valkey/valkey:9-alpine + restart: unless-stopped + healthcheck: + test: ["CMD-SHELL", "redis-cli ping || exit 1"] + interval: 10s + timeout: 5s + retries: 5 + networks: + - immich-net + + postgres: + container_name: immich_postgres + # Immich requires a custom Postgres image with pgvecto-rs / VectorChord for ML similarity search + image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0 + restart: unless-stopped + environment: + POSTGRES_PASSWORD: ${DB_PASSWORD} + POSTGRES_USER: ${DB_USERNAME} + POSTGRES_DB: ${DB_DATABASE_NAME} + POSTGRES_INITDB_ARGS: "--data-checksums" + volumes: + # NOTE: Network shares (NFS/iSCSI) are NOT supported for the database volume. + # Use a local path only. + - ${DB_DATA_LOCATION}:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME} -d ${DB_DATABASE_NAME}"] + interval: 10s + timeout: 5s + retries: 10 + start_period: 30s + networks: + - immich-net + +networks: + immich-net: + name: immich-net + driver: bridge diff --git a/immich.env.example b/immich.env.example new file mode 100644 index 0000000..9d52579 --- /dev/null +++ b/immich.env.example @@ -0,0 +1,7 @@ +IMMICH_VERSION=latest +UPLOAD_LOCATION=/mnt/HomeStorage02/ +MODEL_CACHE= +DB_PASSWORD= +DB_USERNAME= +DB_DATABASE_NAME= +DB_DATABASE_NAM= \ No newline at end of file