Skip to content

Commit

Permalink
add immich-healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
nick322 committed Jan 13, 2025
1 parent 5ce21fd commit 54b9daf
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ RUN \
node_modules \
dist \
/app/immich/server && \
echo "**** copy server immich-healthcheck ****" && \
mkdir -p \
/app/immich/server/bin && \
cp -a \
/tmp/immich/server/bin/immich-healthcheck \
/app/immich/server/bin/immich-healthcheck && \
echo "**** copy scripts ****" && \
cd /tmp/immich/docker && \
cp -r \
Expand Down
30 changes: 30 additions & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,23 @@ opt_param_device_map: false
opt_cap_add_param: false
optional_block_1: false

opt_custom_params:
- name_compose: "healthcheck"
array: true
value:
- "test: immich-healthcheck"
- "start_period: 20s"
- "interval: 30s"
- "retries: 5"
- "timeout: 5s"
- name_compose: "depends_on"
array: true
value:
- "postgres14"
- " condition: service_healthy"
- "redis"
- " condition: service_healthy"

# unraid template
unraid_requirement: "PostgreSQL 14/15/16 with [pgvecto.rs](https://github.com/tensorchord/pgvecto.rs), Redis"
unraid_category: "Backup: Cloud: MediaApp:Photos"
Expand Down Expand Up @@ -94,6 +111,13 @@ external_application_compose_block: |
ports:
- 6379:6379
container_name: redis
healthcheck: #optional
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
start_period: 20s
interval: 30s
retries: 5
timeout: 5s
# PostgreSQL 14:
postgres14:
image: tensorchord/pgvecto-rs:pg14-v0.2.0
Expand All @@ -106,6 +130,12 @@ external_application_compose_block: |
POSTGRES_DB: immich
volumes:
- path_to_postgres:/var/lib/postgresql/data
healthcheck: #optional
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
start_period: 20s
interval: 30s
retries: 5
timeout: 5s
external_application_unraid_block: |
You can also use a docker mods to start redis within the container,
Set `DOCKER_MODS=imagegenius/mods:universal-redis`, and `REDIS_HOSTNAME` to `localhost`.
Expand Down
1 change: 1 addition & 0 deletions root/usr/local/bin/immich-healthcheck

0 comments on commit 54b9daf

Please sign in to comment.