diff --git a/immich/docker-compose.yml b/immich/docker-compose.yml index f5dfb12..f334afb 100644 --- a/immich/docker-compose.yml +++ b/immich/docker-compose.yml @@ -7,21 +7,43 @@ # # The compose file on main may not be compatible with the latest release. +volumes: + UPLOAD_LOCATION: + driver: local + driver_opts: + type: none + o: bind + # WARNING: Immich wants you to specify this only in the ENV file, so change it there too as a precaution. + device: /path/on/host + DB_DATA_LOCATION: + driver: local + driver_opts: + type: none + o: bind + # WARNING: Immich wants you to specify this only in the ENV file, so change it there too as a precaution. + device: /path/on/host + model-cache: + driver: local + driver_opts: + type: none + o: bind + # Immich doesn't want this stored locally for some reason. + device: /path/on/host + name: immich services: immich-server: container_name: immich_server - image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} + image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION} # extends: # file: hwaccel.transcoding.yml # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding 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 - - ${UPLOAD_LOCATION}:/data + - UPLOAD_LOCATION:/data - /etc/localtime:/etc/localtime:ro env_file: - - .env + - immich.env ports: - '2283:2283' depends_on: @@ -42,7 +64,7 @@ services: volumes: - model-cache:/cache env_file: - - .env + - immich.env restart: always healthcheck: disable: false @@ -58,17 +80,16 @@ services: container_name: immich_postgres image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23 environment: - POSTGRES_PASSWORD: ${DB_PASSWORD} - POSTGRES_USER: ${DB_USERNAME} - POSTGRES_DB: ${DB_DATABASE_NAME} + # These are all specified in the environment file. + # POSTGRES_PASSWORD: ${DB_PASSWORD} + # POSTGRES_USER: ${DB_USERNAME} + # POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_INITDB_ARGS: '--data-checksums' # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs # DB_STORAGE_TYPE: 'HDD' + env_file: + - immich.env volumes: - # 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 - - ${DB_DATA_LOCATION}:/var/lib/postgresql/data + - DB_DATA_LOCATION:/var/lib/postgresql/data shm_size: 128mb restart: always - -volumes: - model-cache: