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

Added two more options - wait time and also command to use for testing #106

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Feb 9, 2021

  1. Added two more options to the script - First is 'wait time', which al…

    …lows to specify time interval between each polling - previously it was hardcoded to 1 sec. Second option is 'command' - this allows you to test not only for port being open, but also to execute some testing command / script. For example, you might want to wait, until a REST API server becomes alive - you can have a script that makes calls to this server in order to check if it is alive and with the new option you can call this script and wait until it returns success as return code. Here is some sample usage in ENTRYPOINT: ENTRYPOINT [./wait-for-it.sh, -t, 0, -w, 60, -c, ./check_if_api_is_alive.sh, --, npm, start]. And here is how 'check_if_api_is_alive.sh' script might look like - 'curl --fail --silent localhost:8888/application/health | grep UP || exit 1'
    kopili committed Feb 9, 2021
    Configuration menu
    Copy the full SHA
    317a949 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2021

  1. Configuration menu
    Copy the full SHA
    2092272 View commit details
    Browse the repository at this point in the history