From 957a071a765c662f6ab5fbaf2ab89f6fcb2a7e63 Mon Sep 17 00:00:00 2001 From: CC Date: Thu, 24 Sep 2026 13:15:16 +0100 Subject: [PATCH] immich --- compose/.env | 24 +++++++++++++- compose/docker-compose.yml | 58 ++++++++++++++++++++++++++++++++- terraform/single.tfvars.example | 8 ++--- terraform/variables.tf | 6 ++-- 4 files changed, 87 insertions(+), 9 deletions(-) diff --git a/compose/.env b/compose/.env index a9726dc..2d86da8 100644 --- a/compose/.env +++ b/compose/.env @@ -1 +1,23 @@ -#Example .env for compose \ No newline at end of file +# 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=./library + +# The location where your database files are stored. Network shares are not supported for the database +#DB_DATA_LOCATION=./postgres +DB_URL=postgresql://postgres:postgres@192.168.10.130:5433/immich +DB_PORT=5433 +# 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=Europe/London + +# The Immich version to use. You can pin this to a specific version like "v2.1.0" +IMMICH_VERSION=v3 + +# 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_PASSWORD=postgres + +# The values below this line do not need to be changed +################################################################################### +DB_USERNAME=postgres +DB_DATABASE_NAME=immich \ No newline at end of file diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index 83dadbb..06ce212 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -1 +1,57 @@ -#Example for compose +# +# WARNING: To install Immich, follow our guide: https://docs.immich.app/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: immich + +services: + immich-server: + container_name: immich_server + image: 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 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 + - /etc/localtime:/etc/localtime:ro + env_file: + - .env + ports: + - "2283:2283" + depends_on: + - redis + 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. + # Example tag: ${IMMICH_VERSION:-release}-cuda + image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} + # extends: # uncomment this section for hardware acceleration - see https://docs.immich.app/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 + volumes: + - model-cache:/cache + env_file: + - .env + restart: always + healthcheck: + disable: false + + redis: + container_name: immich_redis + image: docker.io/valkey/valkey:9@sha256:70739f85ad2ee01a726a965584a0f94895f01b0c60b3cc8b0aeef11eaa6888cf + healthcheck: + test: redis-cli ping | grep -q PONG || exit 1 + restart: always + +volumes: + model-cache: diff --git a/terraform/single.tfvars.example b/terraform/single.tfvars.example index 7705723..a1cd31a 100644 --- a/terraform/single.tfvars.example +++ b/terraform/single.tfvars.example @@ -1,11 +1,11 @@ instance_mode = "single" instance = { - service_name = "n8n" - vm_name = "n8n-01" + service_name = "immich" + vm_name = "immich-01" node_name = "pop" app_port = 5678 - app_image = "docker.n8n.io/n8nio/n8n" - vm_tags = ["agentic"] + app_image = "ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}" + vm_tags = ["immich", "photos"] } diff --git a/terraform/variables.tf b/terraform/variables.tf index efa6d64..d71d45d 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -56,9 +56,9 @@ variable "vm_defaults" { vm_machine = "q35" vm_user_sshkey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRlWaLBt/qmWY01Cd6jN/YxLnlT+6lg+evEdN/dIajirdTj1rCbAdlG3WYvo+4BpN17HK3/eGQpGUMbgI/8MVd8YPODcD34gaNX0w2v66BwHx+S6BZUpz5T2IoQT0JtSv/TtFICoff5gXdNRpfd4eWsmTioEqLA6oToJLE4dn3jvAzFi9y7fyLqvuoQMmPidYYJjGT30eiULtXNspoEP+GmuWmVEu+znzMWaKDWKdOsii4Cv1aWCRKSDDRzDBrZI2mP+Vm4HDQBdgDYRw4ehumMDtfaSjyJCnrk691bIM+wxzICuIEecg5kq5HcUPvo2mFyWPAEXb5xlXnuopYEBd7 Generated By NeoServer" bridge = "vmbr0" - vm_cpu = 2 - vm_ram = 2048 - vm_size = 12 + vm_cpu = 4 + vm_ram = 7630 + vm_size = 100 } }