name: immich services: immich-server: image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} container_name: immich-server depends_on: - database - redis volumes: - ${UPLOAD_LOCATION}:/data - /etc/localtime:/etc/localtime:ro # External librariey - type: bind source: /mnt/toshiba/media-library target: /external/toshiba bind: create_host_path: false env_file: - .env networks: - default - proxy restart: unless-stopped healthcheck: disable: false deploy: resources: limits: cpus: "3.0" memory: 4G reservations: cpus: "0.5" memory: 512M devices: - /dev/dri:/dev/dri security_opt: - no-new-privileges:true immich-machine-learning: image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} container_name: immich-machine-learning volumes: - /srv/fast/immich/model-cache:/cache env_file: - .env restart: unless-stopped healthcheck: disable: false cap_drop: - ALL deploy: resources: limits: cpus: "2.0" memory: 4G security_opt: - no-new-privileges:true database: image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23 container_name: immich-postgres volumes: - ${DB_DATA_LOCATION}:/var/lib/postgresql/data environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_INITDB_ARGS: --data-checksums ports: - "127.0.0.1:5432:5432" restart: unless-stopped healthcheck: disable: false deploy: resources: limits: cpus: "1.0" memory: 1G reservations: cpus: "0.2" memory: 128M security_opt: - no-new-privileges:true shm_size: 128mb redis: image: docker.io/valkey/valkey:9@sha256:c123e3715db63d06d4ad6964884037aa0d5d4d703939b9929954112889708e1d container_name: immich-redis restart: unless-stopped healthcheck: test: redis-cli ping || exit 1 cap_add: - CHOWN - SETGID - SETUID # The official image starts as root and drops to the valkey user. cap_drop: - ALL deploy: resources: limits: cpus: "0.5" memory: 512M reservations: cpus: "0.1" memory: 64M security_opt: - no-new-privileges:true networks: proxy: external: true