You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This problem exists when using a docker image in a corporate environment. Running docker psyields: gogs/gogs "/app/gogs/docker/st..." 5 days ago Up 8 minutes (unhealthy)
The reason is that in the health check curl is looking for localhost with a specific port. I assume that the proxy is called to resolve localhost:3000. This is correctly resolved, but by changing the port to 10880 -p 10880:3000 when connecting externally, the curl will not be fulfilled. The health check reports unhealthy.
To reproduce
The problem occurs when using a proxy to connect to the internet. This can be achieved with running the docker image using the parameter: -e HTTP_PROXY="host.docker.internal" -e HTTPS_PROXY="host.docker.internal"
Expected behavior
It is expected that docker ps shows the container as healthy.
Additional context
In the Dockerfile the health check should be written as: HEALTHCHECK CMD (curl --noproxy localhost -o /dev/null -sS http://localhost:3000/healthcheck) || exit 1
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Gogs version
0.14.0+dev
Git version
Operating system
Alpine 3.17
Database
SQLite 3
Describe the bug
This problem exists when using a docker image in a corporate environment. Running
docker ps
yields:gogs/gogs "/app/gogs/docker/st..." 5 days ago Up 8 minutes (unhealthy)
The reason is that in the health check curl is looking for localhost with a specific port. I assume that the proxy is called to resolve localhost:3000. This is correctly resolved, but by changing the port to 10880
-p 10880:3000
when connecting externally, the curl will not be fulfilled. The health check reports unhealthy.To reproduce
The problem occurs when using a proxy to connect to the internet. This can be achieved with running the docker image using the parameter:
-e HTTP_PROXY="host.docker.internal" -e HTTPS_PROXY="host.docker.internal"
Expected behavior
It is expected that
docker ps
shows the container ashealthy
.Additional context
In the Dockerfile the health check should be written as:
HEALTHCHECK CMD (curl --noproxy localhost -o /dev/null -sS http://localhost:3000/healthcheck) || exit 1
Code of Conduct
The text was updated successfully, but these errors were encountered: