|
| 1 | +# |
| 2 | +# WARNING: Make sure to use the docker-compose.yml of the current release: |
| 3 | +# |
| 4 | +# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml |
| 5 | +# |
| 6 | +# The compose file on main may not be compatible with the latest release. |
| 7 | +# |
| 8 | + |
| 9 | +name: immich |
| 10 | + |
| 11 | +services: |
| 12 | + immich-server: |
| 13 | + container_name: immich_server |
| 14 | + image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} |
| 15 | + # extends: |
| 16 | + # file: hwaccel.transcoding.yml |
| 17 | + # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding |
| 18 | + volumes: |
| 19 | + # 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 |
| 20 | + - ${UPLOAD_LOCATION}:/usr/src/app/upload |
| 21 | + - /etc/localtime:/etc/localtime:ro |
| 22 | + env_file: |
| 23 | + - .env |
| 24 | + ports: |
| 25 | + - '2283:2283' |
| 26 | + depends_on: |
| 27 | + - redis |
| 28 | + - database |
| 29 | + restart: always |
| 30 | + healthcheck: |
| 31 | + disable: false |
| 32 | + |
| 33 | + immich-machine-learning: |
| 34 | + container_name: immich_machine_learning |
| 35 | + # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag. |
| 36 | + # Example tag: ${IMMICH_VERSION:-release}-cuda |
| 37 | + # image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} |
| 38 | + build: |
| 39 | + dockerfile: immich_machine_learning.dockerfile |
| 40 | + context: . |
| 41 | + # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration |
| 42 | + # file: hwaccel.ml.yml |
| 43 | + # service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable |
| 44 | + volumes: |
| 45 | + - model-cache:/cache |
| 46 | + env_file: |
| 47 | + - .env |
| 48 | + restart: always |
| 49 | + healthcheck: |
| 50 | + disable: false |
| 51 | + |
| 52 | + redis: |
| 53 | + container_name: immich_redis |
| 54 | + image: docker.io/redis:6.2-alpine@sha256:2ba50e1ac3a0ea17b736ce9db2b0a9f6f8b85d4c27d5f5accc6a416d8f42c6d5 |
| 55 | + healthcheck: |
| 56 | + test: redis-cli ping || exit 1 |
| 57 | + restart: always |
| 58 | + |
| 59 | + database: |
| 60 | + container_name: immich_postgres |
| 61 | + image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 |
| 62 | + environment: |
| 63 | + POSTGRES_PASSWORD: ${DB_PASSWORD} |
| 64 | + POSTGRES_USER: ${DB_USERNAME} |
| 65 | + POSTGRES_DB: ${DB_DATABASE_NAME} |
| 66 | + POSTGRES_INITDB_ARGS: '--data-checksums' |
| 67 | + volumes: |
| 68 | + # 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 |
| 69 | + - ${DB_DATA_LOCATION}:/var/lib/postgresql/data |
| 70 | + healthcheck: |
| 71 | + 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 |
| 72 | + interval: 5m |
| 73 | + start_interval: 30s |
| 74 | + start_period: 5m |
| 75 | + 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' ] |
| 76 | + restart: always |
| 77 | + |
| 78 | + # add pinpoint-collector-agent |
| 79 | + dev-collector: |
| 80 | + restart: always |
| 81 | + image: ghcr.io/pinpoint-apm/pinpoint-c-agent/collector-agent:0.7 |
| 82 | + |
| 83 | + environment: |
| 84 | + - PP_COLLECTOR_AGENT_SPAN_IP=dev-pinpoint |
| 85 | + - PP_COLLECTOR_AGENT_SPAN_PORT=9993 |
| 86 | + - PP_COLLECTOR_AGENT_AGENT_IP=dev-pinpoint |
| 87 | + - PP_COLLECTOR_AGENT_AGENT_PORT=9991 |
| 88 | + - PP_COLLECTOR_AGENT_STAT_IP=dev-pinpoint |
| 89 | + - PP_COLLECTOR_AGENT_STAT_PORT=9992 |
| 90 | + - PP_COLLECTOR_AGENT_ISDOCKER=true |
| 91 | + - PP_Log_Level=DEBUG |
| 92 | + - PP_ADDRESS=0.0.0.0@10000 |
| 93 | + volumes: |
| 94 | + - /etc/hosts:/etc/hosts |
| 95 | + |
| 96 | +volumes: |
| 97 | + model-cache: |
0 commit comments