services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} networks: - immich user: 99:100 ports: - 2283:2283 devices: - /dev/dri:/dev/dri environment: REDIS_HOSTNAME: immich_redis DB_HOSTNAME: PostgreSQL_Immich IMMICH_MEDIA_LOCATION: /photos volumes: - ${LIBRARY_LOCATION}:/photos/library - ${UPLOAD_LOCATION}:/photos/upload - ${THUMB_LOCATION}:/photos/thumbs - ${ENCODED_VIDEO_LOCATION}:/photos/encoded-video - ${PROFILE_LOCATION}:/photos/profile - ${BACKUP_LOCATION}:/photos/backups - ${EXTLIBRARY_LOCATION}:/usr/src/app/external - /etc/localtime:/etc/localtime:ro env_file: - .env depends_on: - redis - database healthcheck: disable: false labels: traefik.enable: true traefik.docker.network: immich-net traefik.http.routers.immich-internal.entrypoints: https traefik.http.routers.immich-internal.rule: Host(`pics.example.com`) traefik.http.services.immich-internal.loadbalancer.server.port: 2283 traefik.http.routers.immich-internal.service: immich-internal traefik.http.routers.immich-external.entrypoints: https-external traefik.http.routers.immich-external.rule: Host(`pics.example.com`) && Header(`X-API-KEY`, `[redacted]`) traefik.http.services.immich-external.loadbalancer.server.port: 2283 traefik.http.routers.immich-external.service: immich-external immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-openvino user: 99:100 networks: - immich device_cgroup_rules: - 'c 189:* rmw' devices: - /dev/dri:/dev/dri volumes: - /dev/bus/usb:/dev/bus/usb - /mnt/cache/appdata/immich_ml:/cache environment: MPLCONFIGDIR: /cache/matplotlib env_file: - .env healthcheck: disable: false redis: container_name: immich_redis image: docker.io/valkey/valkey:8-bookworm@sha256:facc1d2c3462975c34e10fccb167bfa92b0e0dbd992fc282c29a61c3243afb11 networks: - immich healthcheck: test: redis-cli ping || exit 1 database: container_name: PostgreSQL_Immich image: ghcr.io/immich-app/postgres:16-vectorchord0.4.3 user: 99:100 networks: - immich environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_INITDB_ARGS: '--data-checksums' volumes: - ${DB_DATA_LOCATION}:/var/lib/postgresql/data - /mnt/cache/appdata/postgresql/pg_dump/immich/:/backup/pg_dump shm_size: 128mb restart: always networks: immich: name: immich-net external: true