formatting of docker entrypoint script

This commit is contained in:
hackerESQ
2024-09-04 18:41:04 -05:00
parent 11e95e7b5f
commit 50311958f7
+7 -7
View File
@@ -1,28 +1,28 @@
#!/bin/bash
echo "Running entrypoint script..."
echo "=============== Running entrypoint script... =============== "
if [ ! -f "/var/www/app/.env" ]; then
echo "Ope, gotta create an .env file!"
echo " > Ope, gotta create an .env file!"
cp /var/www/app/.env.example /var/www/app/.env
fi
if ( ! grep -q "^APP_KEY=" "/var/www/app/.env" || grep -q "^APP_KEY=$" "/var/www/app/.env"); then
echo "Ah, APP_KEY is missing in .env file. Generating a new key!"
echo " > Ah, APP_KEY is missing in .env file. Generating a new key!"
/usr/local/bin/php /var/www/app/artisan key:generate
fi
echo "Installing Composer dependencies..."
echo "=============== Installing Composer dependencies... =============== "
/usr/local/bin/composer install
echo "Install NPM dependencies and build frontend..."
echo "=============== Install NPM dependencies and build frontend... =============== "
/usr/bin/npm install
/usr/bin/npm run build
echo "Running migrations..."
echo "=============== Running migrations... =============== "
/usr/local/bin/php /var/www/app/artisan migrate
echo "Spinning up Supervisor daemon..."
echo "=============== Spinning up Supervisor daemon... =============== "
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf