Public Repository

Last pushed: a year ago
Short Description
Short description is empty for this repo.
Full Description

Configuration of the MySQL Waiter can be done through the following environment variables:

  • MYSQL_HOST (mandatory)
  • MYSQL_PORT (mandatory)
  • MYSQL_USER (mandatory)
  • MYSQL_PASSWORD (mandatory)
  • MYSQL_QUERY (optional, default value is select 1): As long as the query produce an Error, the ping will be valid.
  • WAITER_ATTEMPTS (mandatory): Number of attempts the waiter will ping the service. If there is no succesful ping after that given number of attempts, it means that the service is expected to never be ready for the current context, so the process will exit with error code 1.
  • WAITER_ATTEMPT_SLEEPTIME (mandatory): Amount of time the waiter will wait in seconds after an unsuccesful ping attempt. After that time, a new attempt will begin.
  • WAITER_DEBUG (optional, default: false): If true, it will show in console the response of the ping command executed on attemps, otherwise it will be hidden.

Example:

$ docker run --name mysql_server -d \
-e MYSQL_ROOT_PASSWORD=root \
-e MYSQL_USER=test \
-e MYSQL_PASSWORD=test \
-e MYSQL_DATABASE=test \
mysql:5.6.28

c03b737671099e1454e65e03cb1d4d1c05fdb4ddfd7bf725112d495ad637605a

$ docker run -it --rm --link mysql_server:mysql_server \
-e MYSQL_HOST=mysql_server \
-e MYSQL_PORT=3306 \
-e MYSQL_USER=test \
-e MYSQL_PASSWORD=test \
-e WAITER_DEBUG=true \
-e WAITER_ATTEMPTS=20 \
-e WAITER_ATTEMPT_SLEEPTIME=1 \
theypsilon/waiter-mysql:0.1.21 && echo DONE!

[WAITER] WAITER_ATTEMPTS: 20 | WAITER_ATTEMPT_SLEEPTIME: 1
[WAITER] ...... OK
DONE!

Docker Pull Command
Owner
theypsilon