|
| 1 | +# documentation: https://immich.app/docs/overview/introduction |
| 2 | +# slogan: Self-hosted photo and video management solution. |
| 3 | +# tags: photo,video,management,server,cloud,storage,sharing,metadata,face,recognition |
| 4 | +# logo: svgs/immich.svg |
| 5 | +# port: 2283 |
| 6 | + |
| 7 | +name: immich |
| 8 | + |
| 9 | +services: |
| 10 | + immich: |
| 11 | + container_name: immich_server |
| 12 | + image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} |
| 13 | + # extends: |
| 14 | + # file: hwaccel.transcoding.yml |
| 15 | + # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding |
| 16 | + volumes: |
| 17 | + # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file |
| 18 | + - ${UPLOAD_LOCATION}:/usr/src/app/upload |
| 19 | + - /etc/localtime:/etc/localtime:ro |
| 20 | + environment: |
| 21 | + - SERVICE_FQDN_IMMICH_3001 |
| 22 | + # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables |
| 23 | + # Hardcoded values, not editable in Coolify UI |
| 24 | + - UPLOAD_LOCATION=./library # The location where your uploaded files are stored |
| 25 | + - DB_DATA_LOCATION=./postgres # The location where your database files are stored |
| 26 | + |
| 27 | + - IMMICH_VERSION=${IMMICH_VERSION:-release} # The Immich version to use, editable in Coolify |
| 28 | + |
| 29 | + # Default values, editable in Coolify UI |
| 30 | + - DB_PASSWORD=$SERVICE_PASSWORD_DATABASE # Default: "postgres", can be overridden |
| 31 | + - DB_USERNAME=$SERVICE_USER_DATABASE # Default: "postgres", can be overridden |
| 32 | + - DB_DATABASE_NAME=${DB_DATABASE_NAME:-immich} # Default: "immich", can be overridden |
| 33 | + |
| 34 | + - TZ=${TZ:-Etc/UTC} |
| 35 | + depends_on: |
| 36 | + - redis |
| 37 | + - database |
| 38 | + restart: always |
| 39 | + healthcheck: |
| 40 | + disable: false |
| 41 | + |
| 42 | + immich-machine-learning: |
| 43 | + container_name: immich_machine_learning |
| 44 | + # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag. |
| 45 | + # Example tag: ${IMMICH_VERSION:-release}-cuda |
| 46 | + image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} |
| 47 | + # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration |
| 48 | + # file: hwaccel.ml.yml |
| 49 | + # service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable |
| 50 | + volumes: |
| 51 | + - model-cache:/cache |
| 52 | + environment: |
| 53 | + # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables |
| 54 | + |
| 55 | + # Hardcoded values, not editable in Coolify UI |
| 56 | + - UPLOAD_LOCATION=./library # The location where your uploaded files are stored |
| 57 | + - DB_DATA_LOCATION=./postgres # The location where your database files are stored |
| 58 | + |
| 59 | + - IMMICH_VERSION=${IMMICH_VERSION:-release} # The Immich version to use, editable in Coolify |
| 60 | + |
| 61 | + # Default values, editable in Coolify UI |
| 62 | + - DB_PASSWORD=$SERVICE_PASSWORD_DATABASE # Default: "postgres", can be overridden |
| 63 | + - DB_USERNAME=$SERVICE_USER_DATABASE # Default: "postgres", can be overridden |
| 64 | + - DB_DATABASE_NAME=${DB_DATABASE_NAME:-immich} # Default: "immich", can be overridden |
| 65 | + |
| 66 | + - TZ=${TZ:-Etc/UTC} |
| 67 | + restart: always |
| 68 | + healthcheck: |
| 69 | + disable: false |
| 70 | + |
| 71 | + redis: |
| 72 | + container_name: immich_redis |
| 73 | + image: docker.io/redis:6.2-alpine@sha256:2d1463258f2764328496376f5d965f20c6a67f66ea2b06dc42af351f75248792 |
| 74 | + healthcheck: |
| 75 | + test: redis-cli ping || exit 1 |
| 76 | + restart: always |
| 77 | + |
| 78 | + database: |
| 79 | + container_name: immich_postgres |
| 80 | + image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 |
| 81 | + environment: |
| 82 | + POSTGRES_PASSWORD: ${DB_PASSWORD} |
| 83 | + POSTGRES_USER: ${DB_USERNAME} |
| 84 | + POSTGRES_DB: ${DB_DATABASE_NAME} |
| 85 | + POSTGRES_INITDB_ARGS: '--data-checksums' |
| 86 | + volumes: |
| 87 | + # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file |
| 88 | + - ${DB_DATA_LOCATION}:/var/lib/postgresql/data |
| 89 | + healthcheck: |
| 90 | + test: pg_isready --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1 |
| 91 | + interval: 5m |
| 92 | + start_interval: 30s |
| 93 | + start_period: 5m |
| 94 | + command: ["postgres", "-c", "shared_preload_libraries=vectors.so", "-c", 'search_path="$$user", public, vectors', "-c", "logging_collector=on", "-c", "max_wal_size=2GB", "-c", "shared_buffers=512MB", "-c", "wal_compression=on"] |
| 95 | + restart: always |
| 96 | + |
| 97 | +volumes: |
| 98 | + model-cache: |
0 commit comments