forked from kobotoolbox/kobo-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
dockerize
waits to kobo-docker
.
- Loading branch information
Esmail Fadae
committed
Feb 12, 2016
1 parent
2b74255
commit 8a6d5e0
Showing
4 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo 'Waiting for container `mongo`.' | ||
dockerize -timeout=20s -wait ${MONGO_PORT} | ||
echo 'Container `mongo` up.` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo 'Waiting for container `psql`.' | ||
dockerize -timeout=20s -wait ${PSQL_PORT} | ||
echo 'Container `psql` up.' | ||
|
||
echo 'Waiting for Postgres service.' | ||
# FIXME: There must be a way to confirm Postgres is serving without these details. | ||
KOBO_PSQL_DB_NAME=${KOBO_PSQL_DB_NAME:-"kobotoolbox"} | ||
KOBO_PSQL_DB_USER=${KOBO_PSQL_DB_USER:-"kobo"} | ||
KOBO_PSQL_DB_PASS=${KOBO_PSQL_DB_PASS:-"kobo"} | ||
until $(PGPASSWORD="${KOBO_PSQL_DB_PASS}" psql -d ${KOBO_PSQL_DB_NAME} -h psql -U ${KOBO_PSQL_DB_USER} -c '' 2> /dev/null); do | ||
sleep 1 | ||
done | ||
echo 'Postgres service ready.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo 'Waiting for container `rabbit`.' | ||
dockerize -timeout=20s -wait ${RABBIT_PORT} | ||
echo 'Container `rabbit` up.' |