From f8a9e8e1021cfafac88de1a4c2508ba59c5a9de7 Mon Sep 17 00:00:00 2001 From: Michal Vanko Date: Thu, 29 Feb 2024 00:29:28 +0100 Subject: [PATCH] live containers on quadlets --- immich/database.container | 6 ++++-- immich/database.volume | 3 +++ immich/immich-machine-learning.container | 6 ++++-- immich/immich-microservices.container | 6 ++++-- immich/immich-network.network | 5 +++++ immich/immich-server.container | 6 ++++-- immich/model-cache.volume | 3 +++ immich/redis.container | 2 ++ immich/uploads.volume | 3 +++ 9 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 immich/database.volume create mode 100644 immich/immich-network.network create mode 100644 immich/model-cache.volume create mode 100644 immich/uploads.volume diff --git a/immich/database.container b/immich/database.container index a02d6c5..c795693 100644 --- a/immich/database.container +++ b/immich/database.container @@ -1,9 +1,11 @@ # database.container [Container] ContainerName=immich_postgres -Environment=POSTGRES_PASSWORD=${DB_PASSWORD} POSTGRES_USER=${DB_USERNAME} POSTGRES_DB=${DB_DATABASE_NAME} +HostName=immich_postgres +EnvironmentFile=.env Image=tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 -Volume=pgdata:/var/lib/postgresql/data +Volume=database.volume:/var/lib/postgresql/data +Network=immich-network.network [Service] Restart=always diff --git a/immich/database.volume b/immich/database.volume new file mode 100644 index 0000000..8c0e516 --- /dev/null +++ b/immich/database.volume @@ -0,0 +1,3 @@ +# database.volume +[Volume] +Driver=local diff --git a/immich/immich-machine-learning.container b/immich/immich-machine-learning.container index fbe0f04..4a99746 100644 --- a/immich/immich-machine-learning.container +++ b/immich/immich-machine-learning.container @@ -1,9 +1,11 @@ # immich-machine-learning.container [Container] ContainerName=immich_machine_learning +HostName=immich_machine_learning EnvironmentFile=.env -Image=ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} -Volume=model-cache:/cache +Image=ghcr.io/immich-app/immich-machine-learning:release +Volume=model-cache.volume:/cache +Network=immich-network.network [Service] Restart=always diff --git a/immich/immich-microservices.container b/immich/immich-microservices.container index bed58a5..573c523 100644 --- a/immich/immich-microservices.container +++ b/immich/immich-microservices.container @@ -4,12 +4,14 @@ Requires=redis.service database.service [Container] ContainerName=immich_microservices +HostName=immich_microservices EnvironmentFile=.env Exec=start.sh microservices -Image=ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} +Image=ghcr.io/immich-app/immich-server:release AutoUpdate=registry -Volume=${UPLOAD_LOCATION}:/usr/src/app/upload +Volume=uploads.volume:/usr/src/app/upload Volume=/etc/localtime:/etc/localtime:ro +Network=immich-network.network [Service] Restart=always diff --git a/immich/immich-network.network b/immich/immich-network.network new file mode 100644 index 0000000..cf992a4 --- /dev/null +++ b/immich/immich-network.network @@ -0,0 +1,5 @@ +[Unit] +Description=Immich Container Network + +[Network] +Label=app=immich diff --git a/immich/immich-server.container b/immich/immich-server.container index e0570f8..8840749 100644 --- a/immich/immich-server.container +++ b/immich/immich-server.container @@ -4,13 +4,15 @@ Requires=redis.service database.service [Container] ContainerName=immich_server +HostName=immich_server EnvironmentFile=.env Exec=start.sh immich -Image=ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} +Image=ghcr.io/immich-app/immich-server:release AutoUpdate=registry PublishPort=2283:3001 -Volume=${UPLOAD_LOCATION}:/usr/src/app/upload +Volume=uploads.volume:/usr/src/app/upload Volume=/etc/localtime:/etc/localtime:ro +Network=immich-network.network [Service] Restart=always diff --git a/immich/model-cache.volume b/immich/model-cache.volume new file mode 100644 index 0000000..8e54759 --- /dev/null +++ b/immich/model-cache.volume @@ -0,0 +1,3 @@ +# model-cache.volume +[Volume] +Driver=local diff --git a/immich/redis.container b/immich/redis.container index b7919e0..1831b77 100644 --- a/immich/redis.container +++ b/immich/redis.container @@ -1,7 +1,9 @@ # redis.container [Container] ContainerName=immich_redis +HostName=immich_redis Image=redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5 +Network=immich-network.network [Service] Restart=always diff --git a/immich/uploads.volume b/immich/uploads.volume new file mode 100644 index 0000000..de77a3f --- /dev/null +++ b/immich/uploads.volume @@ -0,0 +1,3 @@ +# uploads.volume +[Volume] +Driver=local