From f97a0bac4081276e139b0ad36fd4e2ee504ea2a8 Mon Sep 17 00:00:00 2001 From: peskyadmin Date: Sat, 1 Nov 2025 14:11:44 -0400 Subject: [PATCH] release 2.0 --- .env | 22 +-- README.md | 11 +- docker-compose.yml | 55 ++++---- immich/config/immich-config.json | 234 +++++++++++++++++++++++++++++++ 4 files changed, 284 insertions(+), 38 deletions(-) create mode 100644 immich/config/immich-config.json diff --git a/.env b/.env index f0e118d..4e7b1b0 100644 --- a/.env +++ b/.env @@ -1,15 +1,16 @@ -# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables +# You can find documentation for all the supported env variables at https://docs.immich.app/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=./immich/library -# The location where your database files are stored -DB_DATA_LOCATION=./postgres/data + +# The location where your database files are stored. Network shares are not supported for the database +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 +# The Immich version to use. You can pin this to a specific version like "v2.1.0" +IMMICH_VERSION=v2 # 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 @@ -17,9 +18,14 @@ DB_PASSWORD=postgres # The values below this line do not need to be changed ################################################################################### +# Immich server settings +IMMICH_CONFIG_FILE=/usr/src/app/config/immich-config.json # Location the container will look for the config file +IMMICH_CONFIG_DIR=./immich/config # Directory on the host where the config file is stored + +# Database connection settings +DB_HOSTNAME=localhost DB_USERNAME=postgres DB_DATABASE_NAME=immich -# DAM Custom configuration -DB_HOSTNAME=localhost -REDIS_HOSTNAME=localhost +### REDIS +REDIS_HOSTNAME=localhost \ No newline at end of file diff --git a/README.md b/README.md index fbdbd56..8866211 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![Immich with Tailscale](https://immich.app/img/immich-logo-inline-light.png "Immich") -This project sets up a Immich instance with Tailscale VPN integration using Docker Compose. It creates a secure, private network connection for your Immich instance using Tailscale. +This project sets up a Immich instance with Tailscale VPN integration using Docker Compose. It creates a secure, private network connection for your Immich instance using Tailscale. This deployment focuses on getting running quickly and is the most basic single node deployment. ## Prerequisites @@ -18,7 +18,7 @@ ts-immich/ │ ├── tailscale-data/ # Persistent Tailscale state │ └── config/ # Tailscale configuration files └── immich/ - └── config/ # immich configuration files + └── config/ # Immich configuration files ``` ## Setup Instructions @@ -106,4 +106,9 @@ ts-immich/ - Tailscale documentation: https://tailscale.com/kb/ - Immich [documentation]({{service_docs}}) - Immich [repository]({{service_repo}}) - - Immich [linuxserve.io]({{service_lcsr}}) \ No newline at end of file + - Immich [linuxserve.io]({{service_lcsr}}) + + +### Advanced Delpoyments + +It may be common to deploy the machine learning service on a different machine in which case changes need to be made to the `immich-config.json` to machineLearning.urls with the new location of the immich machine learning node(s) or Service. \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 0bad5af..63c21a9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,8 +15,8 @@ services: - net_admin - sys_module restart: unless-stopped - immich: - container_name: immich + immich-server: + container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # file: hwaccel.transcoding.yml @@ -24,19 +24,21 @@ 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 - ${UPLOAD_LOCATION}:/usr/src/app/upload + - ${IMMICH_CONFIG_DIR}:/usr/src/app/config - /etc/localtime:/etc/localtime:ro env_file: - .env # ports: # - '2283:2283' - restart: always - healthcheck: - disable: false network_mode: service:immich-ts depends_on: - immich-ts - - immich-redis - - immich-postgres + - redis + - database + restart: always + healthcheck: + 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. @@ -46,44 +48,43 @@ services: # 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 volumes: - - ./immich-machine-learning/cache:/cache + - model-cache:/cache env_file: - .env + network_mode: service:immich-ts + depends_on: + - immich-ts restart: always healthcheck: disable: false + + redis: + container_name: immich_redis + image: docker.io/valkey/valkey:8-bookworm@sha256:ff21bc0f8194dc9c105b769aeabf9585fea6a8ed649c0781caeac5cb3c247884 network_mode: service:immich-ts depends_on: - immich-ts - immich-redis: - container_name: immich-redis - image: docker.io/valkey/valkey:8-bookworm@sha256:42cba146593a5ea9a622002c1b7cba5da7be248650cbb64ecb9c6c33d29794b1 healthcheck: test: redis-cli ping || exit 1 restart: always - network_mode: service:immich-ts - depends_on: - - immich-ts - immich-postgres: - container_name: immich-postgres - image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:739cdd626151ff1f796dc95a6591b55a714f341c737e27f045019ceabf8e8c52 + + database: + container_name: immich_postgres + image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0@sha256:fa4f6e0971f454cd95fec5a9aaed2ed93d8f46725cc6bc61e0698e97dba96da1 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 file - ${DB_DATA_LOCATION}:/var/lib/postgresql/data - healthcheck: - test: >- - pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1; Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1 - interval: 5m - start_interval: 30s - start_period: 5m - 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 - restart: always network_mode: service:immich-ts depends_on: - - immich-ts \ No newline at end of file + - immich-ts + restart: always + +volumes: + model-cache: diff --git a/immich/config/immich-config.json b/immich/config/immich-config.json new file mode 100644 index 0000000..8ac80da --- /dev/null +++ b/immich/config/immich-config.json @@ -0,0 +1,234 @@ +{ + "backup": { + "database": { + "cronExpression": "0 02 * * *", + "enabled": true, + "keepLastAmount": 14 + } + }, + "ffmpeg": { + "accel": "disabled", + "accelDecode": false, + "acceptedAudioCodecs": [ + "aac", + "mp3", + "libopus" + ], + "acceptedContainers": [ + "mov", + "ogg", + "webm" + ], + "acceptedVideoCodecs": [ + "h264" + ], + "bframes": -1, + "cqMode": "auto", + "crf": 23, + "gopSize": 0, + "maxBitrate": "0", + "preferredHwDevice": "auto", + "preset": "ultrafast", + "refs": 0, + "targetAudioCodec": "aac", + "targetResolution": "720", + "targetVideoCodec": "h264", + "temporalAQ": false, + "threads": 0, + "tonemap": "hable", + "transcode": "required", + "twoPass": false + }, + "image": { + "colorspace": "p3", + "extractEmbedded": false, + "fullsize": { + "enabled": false, + "format": "jpeg", + "quality": 80 + }, + "preview": { + "format": "jpeg", + "quality": 80, + "size": 1440 + }, + "thumbnail": { + "format": "webp", + "quality": 80, + "size": 250 + } + }, + "job": { + "backgroundTask": { + "concurrency": 5 + }, + "faceDetection": { + "concurrency": 2 + }, + "library": { + "concurrency": 5 + }, + "metadataExtraction": { + "concurrency": 5 + }, + "migration": { + "concurrency": 5 + }, + "notifications": { + "concurrency": 5 + }, + "ocr": { + "concurrency": 1 + }, + "search": { + "concurrency": 5 + }, + "sidecar": { + "concurrency": 5 + }, + "smartSearch": { + "concurrency": 2 + }, + "thumbnailGeneration": { + "concurrency": 3 + }, + "videoConversion": { + "concurrency": 1 + } + }, + "library": { + "scan": { + "cronExpression": "0 0 * * *", + "enabled": true + }, + "watch": { + "enabled": false + } + }, + "logging": { + "enabled": true, + "level": "log" + }, + "machineLearning": { + "availabilityChecks": { + "enabled": true, + "interval": 30000, + "timeout": 2000 + }, + "clip": { + "enabled": true, + "modelName": "ViT-B-32__openai" + }, + "duplicateDetection": { + "enabled": true, + "maxDistance": 0.01 + }, + "enabled": true, + "facialRecognition": { + "enabled": true, + "maxDistance": 0.5, + "minFaces": 3, + "minScore": 0.7, + "modelName": "buffalo_l" + }, + "ocr": { + "enabled": true, + "maxResolution": 736, + "minDetectionScore": 0.5, + "minRecognitionScore": 0.8, + "modelName": "PP-OCRv5_mobile" + }, + "urls": [ + "http://localhost:3003" + ] + }, + "map": { + "darkStyle": "https://tiles.immich.cloud/v1/style/dark.json", + "enabled": true, + "lightStyle": "https://tiles.immich.cloud/v1/style/light.json" + }, + "metadata": { + "faces": { + "import": false + } + }, + "newVersionCheck": { + "enabled": true + }, + "nightlyTasks": { + "clusterNewFaces": true, + "databaseCleanup": true, + "generateMemories": true, + "missingThumbnails": true, + "startTime": "00:00", + "syncQuotaUsage": true + }, + "notifications": { + "smtp": { + "enabled": false, + "from": "", + "replyTo": "", + "transport": { + "host": "", + "ignoreCert": false, + "password": "", + "port": 587, + "secure": false, + "username": "" + } + } + }, + "oauth": { + "autoLaunch": false, + "autoRegister": true, + "buttonText": "Login with OAuth", + "clientId": "", + "clientSecret": "", + "defaultStorageQuota": null, + "enabled": false, + "issuerUrl": "", + "mobileOverrideEnabled": false, + "mobileRedirectUri": "", + "profileSigningAlgorithm": "none", + "roleClaim": "immich_role", + "scope": "openid email profile", + "signingAlgorithm": "RS256", + "storageLabelClaim": "preferred_username", + "storageQuotaClaim": "immich_quota", + "timeout": 30000, + "tokenEndpointAuthMethod": "client_secret_post" + }, + "passwordLogin": { + "enabled": true + }, + "reverseGeocoding": { + "enabled": true + }, + "server": { + "externalDomain": "", + "loginPageMessage": "", + "publicUsers": true + }, + "storageTemplate": { + "enabled": false, + "hashVerificationEnabled": true, + "template": "{{y}}/{{y}}-{{MM}}-{{dd}}/{{filename}}" + }, + "templates": { + "email": { + "albumInviteTemplate": "", + "albumUpdateTemplate": "", + "welcomeTemplate": "" + } + }, + "theme": { + "customCss": "" + }, + "trash": { + "days": 30, + "enabled": true + }, + "user": { + "deleteDelay": 7 + } +} \ No newline at end of file