HemmeligOrg / Hemmelig.app

Keep your sensitive information out of chat logs, emails, and more with encrypted secrets.
https://hemmelig.app
MIT License
681 stars 57 forks source link

Docker container marked as unhealthy as healthcheck fails #291

Closed graphixillusion closed 4 months ago

graphixillusion commented 4 months ago

Description

As the title says the docker container is marked as unhealthy as the healthcheck's command is failing with this error:

wget: can't connect to remote host: Connection refused

Container seems to work anyway.

Screenshots

No response

Additional information

No response

bjarneo commented 4 months ago

Thanks for reporting.

I do not have any issues testing the docker-compose directly.

3adbc04fe9c4   hemmeligapp/hemmelig:v5.19.4   "docker-entrypoint.s…"   3 minutes ago   Up 2 minutes (healthy)   0.0.0.0:3000->3000/tcp   hemmeligapp-hemmelig-1

Do you have any issues with your host? This seems local until otherwise is proven.

Anyway, I am adding a commit to improve the docker-compose file. I will add any health checks directly to the Dockerfile.

graphixillusion commented 4 months ago

Even with the changed healthcheck's command i still get unhealthy/connection refused. If i use 127.0.0.1 instead of localhost it works. Any clue?

bjarneo commented 4 months ago

@graphixillusion

Right. What OS? I know you can have some issues if there is something wrong with your docker network, but I do not remember what. I.e. try to use --network=host (which usually connects the docker host to the localhost.

graphixillusion commented 4 months ago

debian 12. Actually is not a problem at all using 127.0.0.1 instead, it's just for curiosity. I remember that usually it worked in the past (same system). I don't know why it doesn't anymore

bjarneo commented 4 months ago

I remember I had a similar issue years ago. You should look into the network part for docker :)