make info messages pop
This commit is contained in:
+7
-16
@@ -4,9 +4,9 @@ cd /var/www/app
|
|||||||
|
|
||||||
echo -e "\n====================== Validating environment... ====================== "
|
echo -e "\n====================== Validating environment... ====================== "
|
||||||
if [[ -z "$APP_KEY" ]]; then
|
if [[ -z "$APP_KEY" ]]; then
|
||||||
echo " > Oops! The required APP_KEY configuration is missing in your environment! "
|
echo "\n > Oops! The required APP_KEY configuration is missing in your environment! \n\n"
|
||||||
echo " > Generating a key (see below) but this will NOT be persisted between container restarts. "
|
echo "\n > Generating a key (see below) but this will NOT be persisted between container restarts. \n\n"
|
||||||
echo " > You should set this APP_KEY in your .env file! "
|
echo "\n > You should set this APP_KEY in your .env file! \n\n"
|
||||||
|
|
||||||
draw_box() {
|
draw_box() {
|
||||||
local text="$1"
|
local text="$1"
|
||||||
@@ -24,7 +24,7 @@ fi
|
|||||||
|
|
||||||
for dir in storage/framework/cache storage/framework/sessions storage/framework/views; do
|
for dir in storage/framework/cache storage/framework/sessions storage/framework/views; do
|
||||||
if [ ! -d "$dir" ]; then
|
if [ ! -d "$dir" ]; then
|
||||||
echo " > $dir is missing. Creating scaffold for storage directory..."
|
echo "\n > $dir is missing. Creating scaffold for storage directory... \n\n"
|
||||||
mkdir -p storage/framework/{cache,sessions,views}
|
mkdir -p storage/framework/{cache,sessions,views}
|
||||||
chmod -R 775 storage
|
chmod -R 775 storage
|
||||||
chown -R www-data:www-data storage
|
chown -R www-data:www-data storage
|
||||||
@@ -32,7 +32,7 @@ for dir in storage/framework/cache storage/framework/sessions storage/framework/
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -L "public/storage" ]; then
|
if [ ! -L "public/storage" ]; then
|
||||||
echo " > Creating symbolic link for app public storage..."
|
echo "\n > Creating symbolic link for app public storage... \n\n"
|
||||||
|
|
||||||
/usr/local/bin/php /var/www/app/artisan storage:link
|
/usr/local/bin/php /var/www/app/artisan storage:link
|
||||||
fi
|
fi
|
||||||
@@ -44,22 +44,13 @@ run_migrations() {
|
|||||||
RETRIES=10
|
RETRIES=10
|
||||||
DELAY=5
|
DELAY=5
|
||||||
until run_migrations; do
|
until run_migrations; do
|
||||||
EXIT_STATUS=$?
|
|
||||||
|
|
||||||
if [ $EXIT_STATUS -ne 0 ]; then
|
|
||||||
|
|
||||||
RETRIES=$((RETRIES-1))
|
RETRIES=$((RETRIES-1))
|
||||||
if [ $RETRIES -le 0 ]; then
|
if [ $RETRIES -le 0 ]; then
|
||||||
echo " > Database is not ready after $RETRIES attempts. Exiting..."
|
echo "\n > Database is not ready after $RETRIES attempts. Exiting... \n\n"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo " > Waiting for database to be ready... retrying in $DELAY seconds."
|
echo "\n > Waiting for database to be ready... retrying in $DELAY seconds. \n\n"
|
||||||
sleep $DELAY
|
sleep $DELAY
|
||||||
else
|
|
||||||
# If migration was successful, break out of the loop
|
|
||||||
echo " > Migration succeeded."
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo -e "\n====================== Spinning up Supervisor daemon... ====================== "
|
echo -e "\n====================== Spinning up Supervisor daemon... ====================== "
|
||||||
|
|||||||
Reference in New Issue
Block a user