From 138e71107ed868076208b463aeab327f553f097f Mon Sep 17 00:00:00 2001 From: hackerESQ Date: Thu, 19 Dec 2024 21:34:58 -0600 Subject: [PATCH] chore: clean up dockerfile and entrypoint script --- Dockerfile => docker/Dockerfile | 0 docker/entrypoint.sh | 16 ++++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) rename Dockerfile => docker/Dockerfile (100%) diff --git a/Dockerfile b/docker/Dockerfile similarity index 100% rename from Dockerfile rename to docker/Dockerfile diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 74cbc46..ffdc0ca 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -2,17 +2,17 @@ cd /var/www/app -echo "====================== Running entrypoint script... ====================== " +echo -e "\n====================== Running entrypoint script... ====================== " if [ ! -f ".env" ]; then echo " > Ope, gotta create an .env file!" cp .env.example .env fi -echo "====================== Installing Composer dependencies... ====================== " +echo -e "\n====================== Installing Composer dependencies... ====================== " /usr/local/bin/composer install -echo "====================== Validating environment... ====================== " +echo -e "\n====================== Validating environment... ====================== " if [ $(stat -c '%U' .) != "www-data" ]; then echo " > Setting correct permissions for pwd..." chown -R www-data:www-data . @@ -30,11 +30,11 @@ if [ ! -L "public/storage" ]; then /usr/local/bin/php artisan storage:link fi -echo "====================== Installing NPM dependencies and building frontend... ====================== " +echo -e "\n====================== Installing NPM dependencies and building frontend... ====================== " /usr/bin/npm install /usr/bin/npm run build -echo "====================== Running migrations... ====================== " +echo -e "\n====================== Running migrations... ====================== " run_migrations() { /usr/local/bin/php artisan migrate --force } @@ -43,12 +43,12 @@ DELAY=5 until run_migrations; do RETRIES=$((RETRIES-1)) if [ $RETRIES -le 0 ]; then - echo "Database is not ready after multiple attempts. Exiting..." + echo " > Database is not ready after multiple attempts. Exiting..." exit 1 fi - echo "Waiting for database to be ready... retrying in $DELAY seconds." + echo " > Waiting for database to be ready... retrying in $DELAY seconds." sleep $DELAY done -echo "====================== Spinning up Supervisor daemon... ====================== " +echo -e "\n====================== Spinning up Supervisor daemon... ====================== " exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf