Advertisement
Joloxx9

Untitled

Dec 24th, 2024
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  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. group_add:
  16. - "993" # GID for GPU
  17. devices:
  18. - /dev/dri:/dev/dri
  19. volumes:
  20. - ${UPLOAD_LOCATION}:/usr/src/app/upload
  21. - ${THUMBS_LOCATION}:/usr/src/app/upload/thumbs
  22. - ${PROFILE_LOCATION}:/usr/src/app/upload/profile
  23. - ${ENCODED_VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
  24. - /etc/localtime:/etc/localtime:ro
  25. env_file:
  26. - stack.env
  27. ports:
  28. - '2283:2283'
  29. depends_on:
  30. - redis
  31. - database
  32. restart: always
  33. healthcheck:
  34. disable: false
  35.  
  36. immich-machine-learning:
  37. container_name: immich_machine_learning
  38. image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
  39. volumes:
  40. - model-cache:/cache
  41. env_file:
  42. - stack.env
  43. restart: always
  44. healthcheck:
  45. disable: false
  46.  
  47. redis:
  48. container_name: immich_redis
  49. image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8
  50. volumes:
  51. - redis-data:/data
  52. healthcheck:
  53. test: redis-cli ping || exit 1
  54. restart: always
  55.  
  56. database:
  57. container_name: immich_postgres
  58. image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
  59. environment:
  60. POSTGRES_PASSWORD: ${DB_PASSWORD}
  61. POSTGRES_USER: ${DB_USERNAME}
  62. POSTGRES_DB: ${DB_DATABASE_NAME}
  63. POSTGRES_INITDB_ARGS: '--data-checksums'
  64. volumes:
  65. - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
  66. healthcheck:
  67. test: >-
  68. pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1;
  69. Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align
  70. --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')";
  71. echo "checksum failure count is $$Chksum";
  72. [ "$$Chksum" = '0' ] || exit 1
  73. interval: 5m
  74. start_interval: 30s
  75. start_period: 5m
  76. command: >-
  77. postgres
  78. -c shared_preload_libraries=vectors.so
  79. -c 'search_path="$$user", public, vectors'
  80. -c logging_collector=on
  81. -c max_wal_size=2GB
  82. -c shared_buffers=512MB
  83. -c wal_compression=on
  84. restart: always
  85.  
  86. volumes:
  87. model-cache:
  88. name: immich_model_cache
  89. redis-data:
  90. name: immich_redis_data
  91.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement