From e5530a92b1293ef504d4d39552fb22abef0ab604 Mon Sep 17 00:00:00 2001 From: Damien Wilson Date: Mon, 9 Oct 2023 12:57:45 +0100 Subject: [PATCH] Integrate restart process for fluid installation. --- Makefile | 7 +++---- bin/restart-notice.sh | 3 +++ bin/restart.sh | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100755 bin/restart-notice.sh diff --git a/Makefile b/Makefile index 34c8866..4a3918a 100644 --- a/Makefile +++ b/Makefile @@ -10,16 +10,15 @@ setup: @chmod +x ./bin/* @[ -f "./.env" ] || cp .env.example .env @echo "http://127.0.0.1:8080/" > public/hot - @docker compose up -d nginx phpmyadmin + @docker compose up -d nginx php mariadb phpmyadmin --no-deps @docker compose exec php /var/www/html/bin/setup.sh @./bin/restart.sh restart: - @docker compose down - @php artisan notify:restart + @docker compose exec php /var/www/html/bin/restart-notice.sh + @docker compose down php @make d-compose - db-migrate: php artisan db:wipe php artisan migrate diff --git a/bin/restart-notice.sh b/bin/restart-notice.sh new file mode 100755 index 0000000..2ca825c --- /dev/null +++ b/bin/restart-notice.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +php artisan notify:restart diff --git a/bin/restart.sh b/bin/restart.sh index 2c48d07..53e588f 100755 --- a/bin/restart.sh +++ b/bin/restart.sh @@ -5,6 +5,5 @@ SETUP_COMPLETE_AGE=$(stat -f '%c' .setup-complete); if [[ -f .setup-complete && $(($(date +%s)-SETUP_COMPLETE_AGE)) -lt 30 ]];then printf '\e[33mINFO: Performing a restart\e[0m\n' make restart - printf '\e[33mINFO: Done\e[0m\n' fi