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

Why prefer python than bash for wait the service start #4539

Closed
AdrianPardo99 opened this issue Aug 24, 2023 · 2 comments · Fixed by #5327
Closed

Why prefer python than bash for wait the service start #4539

AdrianPardo99 opened this issue Aug 24, 2023 · 2 comments · Fixed by #5327

Comments

@AdrianPardo99
Copy link

Description

In this file

https://github.com/cookiecutter/cookiecutter-django/blob/master/%7B%7Bcookiecutter.project_slug%7D%7D/compose/production/django/entrypoint

Why don't use some tcp listener for docker like wait-for or wait-for-it.sh

Rationale

I think executing the python live code its a perfect idea but if we can implement a native script (bash) for implement another services that need to start first in the app maybe can replicate in other projects or services, maybe its only fork the script or the bash function.

Or maybe its only wait for the start of the service in a single file for wait until the database service is already started and exit.

@browniebroke
Copy link
Member

I honestly don't know why it's been done like this, maybe the original pull request has some details. Have you tried to search in the git history?

I personally don't really have an issue with the current solution, but simplifications are always welcome. I'd be happy to replace it with an off the shelves solution.

@browniebroke browniebroke changed the title Why preffer python than bash for wait the service start Why prefer python than bash for wait the service start Aug 31, 2023
@foarsitter
Copy link
Collaborator

Adding wait-for to the project also comes in handy as HEALTHCHECK as discussed in #4428

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants