Replies: 1 comment 3 replies
-
I have no clue how to handle such behavior as db connection is managed by laravel & doctrine. But there is maybe another option: The |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have seen that you use
wait-for-it.sh
in your Docker repository for the entrypoint.Can we perhaps have the PHP program retry with an incresing backoff period the connection to the database before failing (e.g. 2s, 5s, 10s, 20s then fail)? That way there is no need for the container to have some custom shell script to wait for the database to be up.
As far as I know, this is also good practice although please let me know if you feel like there would be a good reason to keep things as is.
I can try doing a PR, although I'm not really familiar with PHP but I guess I can find my way 😉
Beta Was this translation helpful? Give feedback.
All reactions