From ec1808465260c6c26f54eea494d0e1185073c8c7 Mon Sep 17 00:00:00 2001 From: Jens Date: Sun, 16 Aug 2026 09:28:28 +0200 Subject: [PATCH] Initial setup for Immich stack with server, ML, and redis --- .env | 11 +++++++++ docker-compose.yaml | 57 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 .env create mode 100644 docker-compose.yaml diff --git a/.env b/.env new file mode 100644 index 0000000..cd8cc8b --- /dev/null +++ b/.env @@ -0,0 +1,11 @@ +DB_HOSTNAME=postgresql.lan +DB_DATABASE=immich +DB_USERNAME=immich +DB_PASSWORD=Gv4f_Gqhro_QrnM8v4hevdsPISbGDuXF +DB_PORT=5432 + +REDIS_HOSTNAME=redis +REDIS_PORT=6379 +REDIS_DATABASE=0 + +IMMICH_MACHINE_LEARNING_URL=http://immich-machine-learning:3003 diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..81588b0 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,57 @@ +services: + immich-server: + image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} + container_name: immich-server + restart: unless-stopped + + env_file: + - .env + + volumes: + - /mnt/docker/immich/upload:/usr/src/app/upload + + depends_on: + - redis + + networks: + - infra-traefik_traefik-net + + labels: + - "traefik.enable=true" + - "traefik.http.routers.immich.rule=Host(`immich.ljh31.de`)" + - "traefik.http.routers.immich.entrypoints=websecure" + - "traefik.http.routers.immich.tls=true" + - "traefik.http.routers.immich.tls.certresolver=letsencrypt" + - "traefik.http.services.immich.loadbalancer.server.port=3001" + + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:3001/api/server/ping"] + interval: 30s + timeout: 5s + retries: 3 + + immich-machine-learning: + image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} + container_name: immich-machine-learning + restart: unless-stopped + + env_file: + - .env + + volumes: + - /mnt/docker/immich/upload:/usr/src/app/upload + + networks: + - infra-traefik_traefik-net + + redis: + image: docker.io/redis:7.2-alpine + container_name: redis + restart: unless-stopped + + networks: + - infra-traefik_traefik-net + +networks: + infra-traefik_traefik-net: + external: true