Skip to content

Instantly share code, notes, and snippets.

@molind
Last active December 26, 2023 14:09
Show Gist options
  • Save molind/55e17216a7a667a90c6a99b1f6713503 to your computer and use it in GitHub Desktop.
Save molind/55e17216a7a667a90c6a99b1f6713503 to your computer and use it in GitHub Desktop.
immich + traefik = ❤️
version: "3.8"
# Updated from immich v1.91.4
# Before you start it, replace immich.domain.com to your domain and [email protected] to your email.
#
# Traefik web-admin is available on server at port 8080.
# To connect it, forward 8080 port to your machine `ssh -L 8080:127.0.0.1:8080 user@server`, then open http://localhost:8080
name: immich
services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
command: [ "start.sh", "immich" ]
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
depends_on:
- redis
- database
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.immich.rule=Host(`immich.domain.com`)"
- "traefik.http.routers.immich.entrypoints=websecure"
- "traefik.http.routers.immich.tls.certresolver=resolver"
immich-microservices:
container_name: immich_microservices
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
# extends:
# file: hwaccel.yml
# service: hwaccel
command: [ "start.sh", "microservices" ]
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
depends_on:
- redis
- database
restart: always
immich-machine-learning:
container_name: immich_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
volumes:
- model-cache:/cache
env_file:
- .env
restart: always
redis:
container_name: immich_redis
image: redis:6.2-alpine@sha256:80cc8518800438c684a53ed829c621c94afd1087aaeb59b0d4343ed3e7bcf6c5
restart: always
database:
container_name: immich_postgres
image: tensorchord/pgvecto-rs:pg14-v0.1.11
env_file:
- .env
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
volumes:
- pgdata:/var/lib/postgresql/data
restart: always
reverse-proxy:
image: traefik:latest
command:
- "--accesslog=true"
- "--api.insecure=true"
- "--providers.docker"
- "--providers.docker.exposedbydefault=false"
- "--entryPoints.web.address=:80"
- "--entryPoints.websecure.address=:443"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
- "--certificatesResolvers.resolver.acme.httpchallenge=true"
- "--certificatesResolvers.resolver.acme.httpchallenge.entrypoint=web"
- "[email protected]"
- "--certificatesResolvers.resolver.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
- "127.0.0.1:8080:8080"
volumes:
- ./letsencrypt:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock:ro
volumes:
pgdata:
model-cache:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment