Create docker-compose.yml
Create docker-compose.yml and post bellow text (make sure you removed quote from begging)
## WARNING: To install Immich, follow our guide: https://immich.app/docs/install/docker-compose## Make sure to use the docker-compose.yml of the current release:## https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml## The compose file on main may not be compatible with the latest release.
name: immichservices:
immich-server:2fauth:
image: 2fauth/2fauth:latest
container_name:immich_server2fauth
image:restart:ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}# extends:# file: hwaccel.transcoding.yml# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcodingvolumes:# 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}:/usr/src/app/upload- /etc/localtime:/etc/localtime:roenv_file:- .envunless-stopped
ports:
-'2283:2283'depends_on:- redis- databaserestart: alwayshealthcheck:disable: false
immich-machine-learning:container_name: immich_machine_learning# For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.# Example tag: ${IMMICH_VERSION:-release}-cudaimage: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration# file: hwaccel.ml.yml# service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable"8081:8000"
volumes:
-model-cache:./cacheenv_file:- .envrestart: alwayshealthcheck:disable: false
redis:container_name: immich_redisimage: docker.io/valkey/valkey:8-bookworm@sha256:ff21bc0f8194dc9c105b769aeabf9585fea6a8ed649c0781caeac5cb3c247884healthcheck:test: redis-cli ping || exit 1restart: alwaysAPP_NAME=HRD
database:container_name: immich_postgresimage: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0@sha256:fa4f6e0971f454cd95fec5a9aaed2ed93d8f46725cc6bc61e0698e97dba96da1data:/2fauth
environment:
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'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 fileAPP_KEY=base64:BtFvDK7Rz7fKSL5Ogp6bBJmqMbSRZWKNUkZjPHfDA6A=
-${DB_DATA_LOCATION}:APP_URL=https:/var/lib/postgresql/data/2fa.hrdtechnology.com
restart:-always
volumes:Authenticatormodel-cache: