matthewbaggett / wait-for-mysql
Installs: 19 524
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Shell
pkg:composer/matthewbaggett/wait-for-mysql
README
Package that provides a shell script to wait for mysql/mariadb and postgres to be ready.
Does not actually contain any PHP.
Usage
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
MySQL/MariaDB Flavour
| Input | Environment Variables | Example Input | Default |
|---|---|---|---|
| MYSQL_HOST |
|
hostname |
localhost |
| MYSQL_PORT |
|
3306 |
3306 |
| MYSQL_DSN |
|
mysql://user:password@hostname:port/database |
Postgres Flavour
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 |
MongoDB Flavour
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 |
Redis Flavour
There's also a redis flavour:
| Input | Environment Variables | Example Input | Default |
|---|---|---|---|
| REDIS_HOST |
|
hostname |
redis |
| REDIS_PORT |
|
6379 |
6379 |
| REDIS_PASSWORD |
|
password |
DynamoDB Flavour
There's also a dynamodb flavour:
| Input | Environment Variables | Example Input | Default |
|---|---|---|---|
| DYNAMODB_ENDPOINT |
|
http://dynamo:8000 |