Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Feature: Add docker (container) health check #2908

Closed
2 tasks done
MarvinJWendt opened this issue Mar 6, 2022 · 4 comments
Closed
2 tasks done

🚀 Feature: Add docker (container) health check #2908

MarvinJWendt opened this issue Mar 6, 2022 · 4 comments

Comments

@MarvinJWendt
Copy link

MarvinJWendt commented Mar 6, 2022

🔖 Feature description

Adding a HEALTHCHECK command to the Dockerfile, for all the appwrite containers.

For example, to check every five minutes that a web-server is able to serve the main page within three seconds:
HEALTHCHECK CMD curl --fail http:https://localhost || exit 1

🎤 Pitch

Adding a HEALTHCHECK to the Dockerfile would provide the users a better overview of the containers. Docker will execute the HEALTHCHECK command when the container spins up, and report "starting" until the HEALTHCHECK succeeds, or fails. If the HEALTHCHECK passes, the container will report "healthy".

Appwrite already provides some health check API endpoints, so I think it would make sense to include those.

Also, this would make it very easy to spot "faulty" behaviour. I think it would also make the development of appwrite a little easier.

Screenshot of portainer with containers that have a healthcheck and containers that don't
image

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@eldadfux
Copy link
Member

Might be a bit complex as we use the same Dockerfile for all internal containers for easier maintenance. @TorstenDittmann, @lohanidamodar got any ideas what would be the best approach?

@lohanidamodar
Copy link
Member

docker run does seem to support overriding healthcheck command https://docs.docker.com/engine/reference/run/#healthcheck

and docker-compose reference seems to have this as well
https://docs.docker.com/compose/compose-file/compose-file-v3/#healthcheck

So @eldadfux I think we should be add it to each of our containers in compose stack

@eldadfux
Copy link
Member

I'll close this know as it's not a priority. Happy to reopen if someone would like to make a PR and update the compose file.

@SkypLabs
Copy link

Wouldn't it be better to keep it open with a label like help wanted? Otherwise no one will pick this up.

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

No branches or pull requests

5 participants