docker-immich icon indicating copy to clipboard operation
docker-immich copied to clipboard

add immich-healthcheck

Open nick322 opened this issue 11 months ago • 6 comments

copy this file (https://github.com/immich-app/immich/blob/main/server/bin/immich-healthcheck)

nick322 avatar Jan 09 '25 09:01 nick322

I am a bot, here are the test results for this PR: https://ci-tests.imagegenius.io/immich/openvino-v1.124.2-pkg-c8b69308-dev-93a6853aecd4f4dd474c15c66243cb8c54affc58-pr-485/index.html https://ci-tests.imagegenius.io/immich/openvino-v1.124.2-pkg-c8b69308-dev-93a6853aecd4f4dd474c15c66243cb8c54affc58-pr-485/shellcheck-result.xml

Tag Passed
openvino-v1.124.2-pkg-c8b69308-dev-93a6853aecd4f4dd474c15c66243cb8c54affc58-pr-485

ImageGeniusCI avatar Jan 09 '25 09:01 ImageGeniusCI

I believe it would just be best to mention a healthcheck can be added to the docker compose and probe /api/server/ping, no modifications to the container itself

hydazz avatar Jan 09 '25 23:01 hydazz

Actually, I also created a modified version by copying server/bin/immich-healthcheck and then creating a symlink. Later, I figured that immich-healthcheck probably wouldn't change, so I just copied it directly for use.

I noticed in the source code (https://github.com/immich-app/immich/blob/main/server/Dockerfile) that the healthcheck is enabled by default, but in the docker-compose file (https://github.com/immich-app/immich/blob/main/docker/docker-compose.prod.yml), the healthcheck is disabled by default. That's why I thought of documenting the healthcheck in the README.

nick322 avatar Jan 10 '25 01:01 nick322

I am a bot, here are the test results for this PR: https://ci-tests.imagegenius.io/immich/openvino-v1.124.2-pkg-c8b69308-dev-6875ddb89c8bd6ff538a04983a09ab96bd6ce997-pr-485/index.html https://ci-tests.imagegenius.io/immich/openvino-v1.124.2-pkg-c8b69308-dev-6875ddb89c8bd6ff538a04983a09ab96bd6ce997-pr-485/shellcheck-result.xml

Tag Passed
openvino-v1.124.2-pkg-c8b69308-dev-6875ddb89c8bd6ff538a04983a09ab96bd6ce997-pr-485

ImageGeniusCI avatar Jan 10 '25 05:01 ImageGeniusCI

I am a bot, here are the test results for this PR: https://ci-tests.imagegenius.io/immich/openvino-v1.124.2-pkg-c8b69308-dev-54b9daf677f21b8eb7489f2250784772e75ec59d-pr-485/index.html https://ci-tests.imagegenius.io/immich/openvino-v1.124.2-pkg-c8b69308-dev-54b9daf677f21b8eb7489f2250784772e75ec59d-pr-485/shellcheck-result.xml

Tag Passed
openvino-v1.124.2-pkg-c8b69308-dev-54b9daf677f21b8eb7489f2250784772e75ec59d-pr-485

ImageGeniusCI avatar Jan 13 '25 01:01 ImageGeniusCI

In my container immich-healthcheck is present at /app/immich/server/bin/immich-healthcheck and usable for healthcheck. It does use IMMICH_PORT and IMMICH_HOST if set. Unfortunately it's not working due to a lack of IMMICH_PORT (and IMMICH_HOST - but default is localhost which is fine). IMMICH_PORT/HOST have been replaced by SERVER_PORT/HOST recently.

Maybe the easiest approach would be to set IMMICH_PORT and IMMICH_HOST as a copy of SERVER_PORT and SERVER_HOST if given?

loeffelpan avatar Sep 08 '25 13:09 loeffelpan