-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fb3a2d
commit 9169a15
Showing
1 changed file
with
11 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
#!/bin/sh | ||
|
||
while true; do | ||
if nc -z -w 5 $DB_HOST $DB_PORT; then | ||
echo "Successfully connected to DB" | ||
break | ||
else | ||
echo "Failed to connect to DB. Retrying in 10 seconds..." | ||
sleep 10 | ||
fi | ||
done | ||
|
||
php /var/www/html/artisan migrate --isolated --force | ||
php /var/www/html/artisan config:clear | ||
php /var/www/html/artisan config:cache | ||
php /var/www/html/artisan cache:clear | ||
supervisord -c /etc/supervisord.conf | ||
supervisord -c /etc/supervisord.conf |