Conversation
60c52ec to
b2a9f93
Compare
Before this commit, if docker-entrypoint or any file in mailman-web changed, the Docker build cache would not be used, so the install of dependencies would run again, uselessly
|
Hello @maxking , I rebased my PR on |
|
Hey @am97, thanks for taking time to work on this :-) I would like to avoid depending on yet-another script for code that is already there. More dependencies tend to bite in the future and existing code to check for server is simple enough that I don't mind maintaining it. The optimizations are nice, if you can remove the changes for wait-for-it, we can go ahead with merging this. |
|
Ok no problem, I left just the optimizations so I changed the title of the PR. Are you still open to the following in a separate PR ? # TODO: Use python3's psycopg2 module to do this in python3 instead of
# installing postgres-client in the image. |
|
Yeah, we can do that. Although, i've also been thinking if we can just use composes' new startup order feature instead of doing it manually in the entrypoint script (although, maybe outside of compose, there is some value in having the checks in entrypoint script) |
That sounds better at first sigh, although it has some drawbacks:
|
wait-for-it is a widely used script for checking if a service is responding on a given port.
This PR reduces the uncompressed size of maxking/mailman-web from 248MB to 229MB, and simplifies the code a bit.
I tested it with Postgres and MariaDB