Wait for the database
This commit is contained in:
parent
ad8d43815e
commit
a8c0e17bed
1 changed files with 6 additions and 0 deletions
|
|
@ -26,6 +26,12 @@ jobs:
|
||||||
POSTGRES_USER: user
|
POSTGRES_USER: user
|
||||||
POSTGRES_PASSWORD: password
|
POSTGRES_PASSWORD: password
|
||||||
POSTGRES_DB: db
|
POSTGRES_DB: db
|
||||||
|
# Start the steps only once the database accepts connections
|
||||||
|
options: >-
|
||||||
|
--health-cmd "pg_isready --username=user --dbname=db"
|
||||||
|
--health-interval 2s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 15
|
||||||
|
|
||||||
# Same variables as in `.env` on `nehemiah`, the main development machine
|
# Same variables as in `.env` on `nehemiah`, the main development machine
|
||||||
env:
|
env:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue