Waits for pb to start before starting backend

This commit is contained in:
Aaron Louie 2020-05-22 21:14:27 -04:00
parent 82bf880ec8
commit 029e9d4cde
1 changed files with 24 additions and 20 deletions

View File

@ -13,28 +13,10 @@ services:
test: ["CMD", "pg_isready"]
timeout: 20s
retries: 10
backend:
container_name: backend
depends_on:
- db
image: sartography/cr-connect-workflow:$E2E_TAG
environment:
- FLASK_APP=./crc/__init__.py
- UPGRADE_DB=true
- RESET_DB=true
- LDAP_URL=ldap
- DB_HOST=db
- DB_PORT=5432
- DB_PASSWORD=crc_pass
- DB_USER=crc_user
- DB_NAME=crc_test
ports:
- "5000:5000"
command: ./wait-for-it.sh db:5432 -t 0 -- ./docker_run.sh
pb:
container_name: pb
depends_on:
- db
image: sartography/protocol-builder-mock:$E2E_TAG
environment:
- FLASK_APP=/protocol-builder-mock/app.py
@ -53,3 +35,25 @@ services:
image: tuxmonteiro/ldap-mock
ports:
- "3890"
backend:
container_name: backend
depends_on:
- db
- pb
- ldap
image: sartography/cr-connect-workflow:$E2E_TAG
environment:
- FLASK_APP=./crc/__init__.py
- UPGRADE_DB=true
- RESET_DB=true
- LDAP_URL=ldap
- PB_BASE_URL=http://pb:5001/pb
- DB_HOST=db
- DB_PORT=5432
- DB_PASSWORD=crc_pass
- DB_USER=crc_user
- DB_NAME=crc_test
ports:
- "5000:5000"
command: ./wait-for-it.sh pb:5001 -t 0 -- ./docker_run.sh