services: immich-server: container_name: immich_server environment: - PUID=${PUID} - PGID=${PGID} - TZ=${TZ} image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} volumes: - /path/to/immich/data:/data - /path/to/immich/upload:/usr/src/app/upload - /path/to/external-library-1:/path/to/external-library-1:ro - /path/to/external-library-2:/path/to/external-library-2:ro env_file: - .env ports: - ${HTTP_PORT}:2283 depends_on: - redis - database restart: unless-stopped networks: - immich-net immich-machine-learning: container_name: immich_machine_learning environment: - PUID=${PUID} - PGID=${PGID} - TZ=${TZ} image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - /path/to/immich/model-cache:/cache env_file: - .env restart: unless-stopped networks: - immich-net redis: container_name: immich_redis image: redis:6.2-alpine environment: - PUID=${PUID} - PGID=${PGID} - TZ=${TZ} volumes: - /path/to/immich/redis:/data restart: unless-stopped networks: - immich-net database: container_name: immich_postgres image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0 env_file: - .env environment: - PUID=${PUID} - PGID=${PGID} - TZ=${TZ} - POSTGRES_PASSWORD=${DB_PASSWORD} - POSTGRES_USER=${DB_USERNAME} - POSTGRES_DB=${DB_DATABASE_NAME} - POSTGRES_INITDB_ARGS='--data-checksums' volumes: - /path/to/immich/pgdata:/var/lib/postgresql/data shm_size: 128mb restart: unless-stopped networks: - immich-net networks: immich-net: external: true