{"repo":"nickjj/wait-until","free":true,"listed":false,"github":"https://github.com/nickjj/wait-until","clone":"git clone https://github.com/nickjj/wait-until.git","description":"A zero dependency Bash script that waits until a command of your choosing has run successfully.","language":"Shell","stars":66,"topics":["bash","wait","docker","docker-compose"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"wait-until A zero dependency Bash script that waits until a command of your choosing has run successfully. - Demo Video - Use Cases - Installation - Usage Examples - Configuration Options - About the Author Demo Video This video covers why you might want to use this script and how to use it. It's basically the documentation in video form. Use Cases I mainly use this in my CI pipelines to wait until a Dockerized database is ready to accept connections to a specific database as a specific user. For example, you might have something like this in your CI set up: The make commands don't really matter, but the idea is you can't really reset your database or run your tests that depend on your database being set up before your database is available. When you first start the official PostgreSQL or MySQL Docker containers, it will take about 5 to 10 seconds for your initial database user / database to be created based on environment variables you pass into the container. This isn't a problem in development because you'd probably run everything in the foreground and manually wait until your DB is ready before interacting with your project. But in a CI environment, it's a problem because it will blow up without waiting. Technically you can use this script to wait for any command to run successfully. There is nothing about it that's limited to databases or CI environments. There are usage examples included in the README. Why not sleep X seconds? You could, but that's kind of brittle becau","default_branch":null,"files":null,"tree":[],"storefront":"/r/nickjj","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nickjj/wait-until/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}