Skip to content

Conversation

@nick322
Copy link
Contributor

@nick322 nick322 commented Jan 9, 2025

@ImageGeniusCI
Copy link
Contributor

Copy link
Collaborator

@martabal martabal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't want to maintain this script, if this is just a copy of the upstream script, just copy it when building the image and add of soft link to /root/usr/local/bin/immich-healthcheck

docker-immich/Dockerfile

Lines 73 to 77 in fc199ad

echo "**** copy scripts ****" && \
cd /tmp/immich/docker && \
cp -r \
scripts \
/app/immich/server && \

I can't remember exactly why, but upstream has disabled the healtcheck by default, IMO it should be the same.

@hydazz
Copy link
Member

hydazz commented Jan 9, 2025

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

@nick322
Copy link
Contributor Author

nick322 commented Jan 10, 2025

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.

@ImageGeniusCI
Copy link
Contributor

@ImageGeniusCI
Copy link
Contributor

@loeffelpan
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants