Izya12

docker-compose.yml

Oct 2nd, 2024
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.18 KB | None | 0 0
  1. version: '3.8'
  2.  
  3. #
  4. # WARNING: Make sure to use the docker-compose.yml of the current release:
  5. #
  6. # https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
  7. #
  8. # The compose file on main may not be compatible with the latest release.
  9. #
  10.  
  11. name: immich
  12.  
  13. services:
  14. immich-server:
  15. container_name: immich_server
  16. image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
  17. # extends:
  18. # file: hwaccel.transcoding.yml
  19. # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
  20. build:
  21. context: ../
  22. dockerfile: server/Dockerfile
  23. volumes:
  24. - ${UPLOAD_LOCATION}:/usr/src/app/upload
  25. - ${UPLOAD_LOCATION2}:/mnt/nas:ro
  26. - /etc/localtime:/etc/localtime:ro
  27. env_file:
  28. - .env
  29. ports:
  30. - 2283:3001
  31. depends_on:
  32. - redis
  33. - database
  34. restart: always
  35.  
  36. immich-machine-learning:
  37. container_name: immich_machine_learning
  38. image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
  39. #image: immich-machine-learning:latest
  40. # extends:
  41. # file: hwaccel.ml.yml
  42. # service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference
  43. build:
  44. context: ../machine-learning
  45. dockerfile: Dockerfile
  46. args:
  47. - DEVICE=cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference
  48. device_cgroup_rules:
  49. - "c 189:* rmw"
  50. devices:
  51. - /dev/dri:/dev/dri
  52. volumes:
  53. - /dev/bus/usb:/dev/bus/usb
  54. - model-cache:/cache
  55. env_file:
  56. - .env
  57. restart: always
  58.  
  59. # immich-prometheus:
  60. # container_name: immich_prometheus
  61. # ports:
  62. # - 9090:9090
  63. # image: prom/prometheus@sha256:f20d3127bf2876f4a1df76246fca576b41ddf1125ed1c546fbd8b16ea55117e6
  64. # image: prom/prometheus@sha256:f6639335d34a77d9d9db382b92eeb7fc00934be8eae81dbc03b31cfe90411a94
  65. # volumes:
  66. # - ./prometheus.yml:/etc/prometheus/prometheus.yml
  67. # - prometheus-data:/prometheus
  68. #
  69. # first login uses admin/admin
  70. # add data source for http://immich-prometheus:9090 to get started
  71. # immich-grafana:
  72. # container_name: immich_grafana
  73. # command: ['./run.sh', '-disable-reporting']
  74. # ports:
  75. # - 3000:3000
  76. ## image: grafana/grafana:11.1.3-ubuntu@sha256:e10453733015f31103cb530425f32c994816b50102886fa885dafea2c50a711c
  77. # image: grafana/grafana:11.2.0-ubuntu@sha256:8e2c13739563c3da9d45de96c6bcb63ba617cac8c571c060112c7fc8ad6914e9
  78. # volumes:
  79. # - grafana-data:/var/lib/grafana
  80. #
  81. redis:
  82. container_name: immich_redis
  83. # image: redis:6.2-alpine@sha256:e3b17ba9479deec4b7d1eeec1548a253acc5374d68d3b27937fcfe4df8d18c7e
  84. image: redis:6.2-alpine@sha256:2d1463258f2764328496376f5d965f20c6a67f66ea2b06dc42af351f75248792
  85. healthcheck:
  86. test: redis-cli ping || exit 1
  87. restart: always
  88.  
  89. database:
  90. container_name: immich_postgres
  91. image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
  92. env_file:
  93. - .env
  94. environment:
  95. POSTGRES_PASSWORD: ${DB_PASSWORD}
  96. POSTGRES_USER: ${DB_USERNAME}
  97. POSTGRES_DB: ${DB_DATABASE_NAME}
  98. POSTGRES_INITDB_ARGS: '--data-checksums'
  99. volumes:
  100. - ./pgdata:/var/lib/postgresql/data
  101. 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"]
  102. restart: always
  103.  
  104. backup:
  105. container_name: immich_db_dumper
  106. image: prodrigestivill/postgres-backup-local
  107. env_file:
  108. - .env
  109. environment:
  110. POSTGRES_HOST: database
  111. POSTGRES_DB: ${DB_DATABASE_NAME}
  112. POSTGRES_USER: ${DB_USERNAME}
  113. POSTGRES_PASSWORD: ${DB_PASSWORD}
  114. SCHEDULE: "@daily"
  115. BACKUP_DIR: /db_dumps
  116. volumes:
  117. - ./db_dumps:/db_dumps
  118. depends_on:
  119. - database
  120.  
  121. # watchtower:
  122. # image: containrrr/watchtower
  123. # volumes:
  124. # - /var/run/docker.sock:/var/run/docker.sock
  125. volumes:
  126. # pgdata:
  127. model-cache:
  128. prometheus-data:
  129. grafana-data:
  130.  
Advertisement
Add Comment
Please, Sign In to add comment