forked from coyote-team/coyote
-
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.
Change gcp_deploy script in preparation for production
- Loading branch information
Flip Sasser
committed
Jun 5, 2020
1 parent
8340d1e
commit 074ec93
Showing
6 changed files
with
35 additions
and
32 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
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 |
---|---|---|
@@ -1,11 +1,15 @@ | ||
#!/bin/sh | ||
|
||
until nc -z -v -w30 $DATABASE_HOST 5432 | ||
do | ||
sleep 1 | ||
done | ||
bundle check || bundle install --jobs=$(getconf _NPROCESSORS_ONLN) | ||
|
||
sleep 2 # Well give it a second, jeez | ||
if [ -n "${DATABASE_URL}" ]; then | ||
database_host=$(echo ${DATABASE_URL} | cut -d "/" -f3 | cut -d "@" -f2 | cut -d ":" -f1) | ||
database_port=$(echo ${DATABASE_URL} | cut -d "/" -f3 | cut -d "@" -f2 | cut -d ":" -f2) | ||
until nc -z -v -w30 ${database_host} ${database_port}; do | ||
echo "Waiting for ${database_host}:${database_port}..." | ||
sleep 1 | ||
done | ||
fi | ||
|
||
echo "Starting with '$@'" | ||
exec $@ |
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
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