Package that provides a shell script to wait for mysql/mariadb and postgres to be ready.
Does not actually contain any PHP.
export MYSQL_HOST=localhost
export MYSQL_PORT=3306
vendor/bin/wait-for-mysql
Or using a DSN:
export MYSQL_DSN=mysql://user:password@hostname:port/database
vendor/bin/wait-for-mysql
Input | Environment Variables | Example Input | Default |
---|---|---|---|
MYSQL_HOST |
|
hostname |
localhost |
MYSQL_PORT |
|
3306 |
3306 |
MYSQL_DSN |
|
mysql://user:password@hostname:port/database |
There's also a postgres flavour, wait-for-postgres
which has similar usage and environment variables as above.
Input | Environment Variables | Example Input | Default |
---|---|---|---|
POSTGRES_HOST |
|
hostname |
localhost |
POSTGRES_PORT |
|
5432 |
5432 |
POSTGRES_DSN |
|
postgres://user:password@hostname:port/database |
There's also a mongodb flavour:
Input | Environment Variables | Example Input | Default |
---|---|---|---|
MONGODB_HOST |
|
hostname |
localhost |
MONGODB_PORT |
|
27017 |
27017 |
MONGODB_DSN |
|
mongodb://user:password@hostname:port/database |
|
MONGODB_DATABASE |
|
database |
|
MONGODB_USERNAME |
|
username |
|
MONGODB_PASSWORD |
|
password |
There's also a redis flavour:
Input | Environment Variables | Example Input | Default |
---|---|---|---|
REDIS_HOST |
|
hostname |
redis |
REDIS_PORT |
|
6379 |
6379 |
REDIS_PASSWORD |
|
password |
There's also a dynamodb flavour:
Input | Environment Variables | Example Input | Default |
---|---|---|---|
DYNAMODB_ENDPOINT |
|
http://dynamo:8000 |