Skip to content

Commit

Permalink
Integrate restart process for fluid installation.
Browse files Browse the repository at this point in the history
  • Loading branch information
wilson1000 committed Oct 9, 2023
1 parent ba6e0bd commit e5530a9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions bin/restart-notice.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

php artisan notify:restart
1 change: 0 additions & 1 deletion bin/restart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e5530a9

Please sign in to comment.