diff --git a/README.md b/README.md index ac11242..a6bdaf9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # immich-app podman + quadlet deployment +⚠️ **Curently supported immich version: [v1.108.0](https://github.com/immich-app/immich/releases/tag/v1.108.0)** ⚠️ + + This is a set of unit files to deploy immich through the podman-quadlet systemd generator See the [documentation](https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html) @@ -7,15 +10,18 @@ This is adapted from immich provided docker-compose file, this will create a pod # Overview -This setup consist in one `.image` file that does some prep work: pulling the image and creating a podman pod that will host all the containers -Then the `.container` files are translated into systemd units that create the containers. +This setup consist in: + - `immich.pod` file defining a pod that will host all the containers. + - `immich-server.image` defining the immich version. + - several `immich-*.container` files defining the containers, volumes etc.. + +The `.container` files are translated into systemd units that create the containers. Note how the `immich-server.container` have an install target on `default.target` which makes it start on boot. -I am not sure the `multi-user` target is really needed. # How do I deploy it ? -Rename `env.example` to `immich.env`. +Rename `env.example` to `immich.env`. Populate the values as needed. ## rootful podman @@ -74,4 +80,4 @@ The containers should start on the next boot automatically. # TODO - write a makefile or a justfile that insert the variables in the unit files maybe ? Right now it requires some copy and pasting. -- Contribute it upstream to immich +- Contribute it upstream to immich : no longer a goal, they stated they are [not interested](https://github.com/immich-app/immich/discussions/7977). diff --git a/immich-database.container b/immich-database.container index 9133f07..cb5bc99 100644 --- a/immich-database.container +++ b/immich-database.container @@ -8,7 +8,7 @@ HealthCmd=["/usr/bin/pg_isready"] HealthStartPeriod=30s HealthInterval=10s HealthTimeout=5s -HealthRetries=5 +HealthRetries=2 Notify=healthy [Service] diff --git a/immich-microservices.container b/immich-microservices.container deleted file mode 100644 index a07614f..0000000 --- a/immich-microservices.container +++ /dev/null @@ -1,22 +0,0 @@ -[Unit] -Requires=immich-redis.service immich-database.service -After=immich-redis.service immich-database.service - -[Container] -Pod=immich.pod -ContainerName=immich_microservices -EnvironmentFile=immich.env -Exec=start.sh microservices -Image=immich-server.image -Volume=/home/raid/immich:/usr/src/app/upload:z -Volume=/etc/localtime:/etc/localtime:ro -HealthCmd=["/bin/bash", "-c", "exec 5<>/dev/tcp/127.0.0.1/3002"] -HealthStartPeriod=30s -HealthInterval=10s -HealthTimeout=5s -HealthRetries=5 -Notify=healthy - -[Service] -Restart=always - diff --git a/immich-redis.container b/immich-redis.container index 8c20a2f..15399c8 100644 --- a/immich-redis.container +++ b/immich-redis.container @@ -1,7 +1,7 @@ [Container] Pod=immich.pod ContainerName=immich_redis -Image=docker.io/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5 +Image=docker.io/redis:6.2-alpine@sha256:328fe6a5822256d065debb36617a8169dbfbd77b797c525288e465f56c1d392b HealthCmd=["/usr/local/bin/redis-cli", "ping"] HealthStartPeriod=30s HealthInterval=10s diff --git a/immich-server.container b/immich-server.container index caa1766..19ac5ca 100644 --- a/immich-server.container +++ b/immich-server.container @@ -1,6 +1,6 @@ [Unit] -Requires=immich-redis.service immich-database.service immich-microservices.service immich-database.service immich-machine-learning.service -After=immich-redis.service immich-database.service immich-microservices.service immich-database.service immich-machine-learning.service +Requires=immich-redis.service immich-database.service +After=immich-redis.service immich-database.service [Container] Pod=immich.pod @@ -18,6 +18,8 @@ HealthRetries=10 Notify=healthy [Service] +# give some time to the database to start +ExecStartPre=sleep 30 Restart=always [Install] diff --git a/immich-server.image b/immich-server.image index e52e13d..1d01581 100644 --- a/immich-server.image +++ b/immich-server.image @@ -3,4 +3,4 @@ Wants=nss-lookup.target After=nss-lookup.target [Image] -Image=ghcr.io/immich-app/immich-server:v1.101.1 +Image=ghcr.io/immich-app/immich-server:v1.108.0