From b24e162eae4d094e2236de9ae6610f1bd8980da3 Mon Sep 17 00:00:00 2001 From: Nick Yeoman Date: Sun, 5 Jan 2025 23:20:34 -0800 Subject: [PATCH] immich working --- immich/docker-compose.yml | 22 ++++++++++++---------- immich/sample.env | 11 +++-------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/immich/docker-compose.yml b/immich/docker-compose.yml index 284e837..d732048 100644 --- a/immich/docker-compose.yml +++ b/immich/docker-compose.yml @@ -7,12 +7,17 @@ services: volumes: # 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 - ${VOL_PATH:-./data}/immich-upload:/usr/src/app/upload + - ${VOL_PATH:-./data}/immich-import:/import - /etc/localtime:/etc/localtime:ro - env_file: - - .env + environment: + - REDIS_HOSTNAME=${REDIS_HOSTNAME:-immich-redis} + - DB_HOSTNAME=${DB_HOSTNAME:-immich-postgres} + - DB_PASSWORD=${DB_PASSWORD:-postgres} + - DB_USERNAME=${DB_USERNAME:-postgres} + - DB_DATABASE_NAME=${DB_DATABASE_NAME:-immich} depends_on: - - redis - - database + - immich-redis + - immich-postgres healthcheck: disable: false networks: @@ -28,8 +33,6 @@ services: # service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable volumes: - ${VOL_PATH:-./data}/model-cache:/cache - env_file: - - .env healthcheck: disable: false networks: @@ -45,9 +48,9 @@ services: immich-postgres: image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 environment: - POSTGRES_PASSWORD: ${DB_PASSWORD} - POSTGRES_USER: ${DB_USERNAME} - POSTGRES_DB: ${DB_DATABASE_NAME} + POSTGRES_PASSWORD: ${DB_PASSWORD:-postgrespass} + POSTGRES_USER: ${DB_USERNAME:-postgres} + POSTGRES_DB: ${DB_DATABASE_NAME:-immich} POSTGRES_INITDB_ARGS: '--data-checksums' volumes: - ${VOL_PATH:-./data}/immich-postgres:/var/lib/postgresql/data @@ -59,7 +62,6 @@ services: echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1 interval: 5m - start_interval: 30s start_period: 5m command: >- postgres diff --git a/immich/sample.env b/immich/sample.env index f620263..90e8d91 100644 --- a/immich/sample.env +++ b/immich/sample.env @@ -10,17 +10,12 @@ UPLOAD_LOCATION=./library # The location where your database files are stored DB_DATA_LOCATION=./postgres -# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List -# TZ=Etc/UTC - # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release -# Connection secret for postgres. You should change it to a random password -# Please use only the characters `A-Za-z0-9`, without special characters or spaces +DB_HOSTNAME=immich-postgres DB_PASSWORD=postgres - -# The values below this line do not need to be changed -################################################################################### DB_USERNAME=postgres DB_DATABASE_NAME=immich + +REDIS_HOSTNAME=immich-redis \ No newline at end of file