ptut-virtenv/Makefile

49 lines
2.4 KiB
Makefile
Raw Normal View History

start:
@test "`docker-compose ps | wc -l`" -le "2" || (echo -e "/!\\ already running environment\n"; exit 1);
@echo -e "\e[33m> [1] pre-start script\e[0m";
@bash ./metactl/pre-start.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
@echo;
@echo -e "\e[33m> [2] Build & launch environment\e[0m";
@echo;
@docker-compose up -d && echo -e "\e[33m< done\e[0m" || (echo "\e[33m< failed\e[0m"; exit 1);
@echo;
@echo -e "\e[33m> [3] post-start script\e[0m";
@bash ./metactl/post-start.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
@echo -e "\e[0m";
start-no-log:
@test "`docker-compose ps | wc -l`" -le "2" || (echo -e "/!\\ already running environment\n"; exit 1);
@echo -e "\e[33m> [1] pre-start script\e[0m";
@bash ./metactl/pre-start.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
2018-02-18 18:07:21 +00:00
@echo;
@echo -e "\e[33m> [2] Build & launch environment\e[0m";
@docker-compose up -d > /dev/null 2>&1 && echo -e "\e[33m< done\e[0m" || (echo "\e[33m< failed\e[0m"; exit 1);
2018-02-18 18:07:21 +00:00
@echo;
@echo -e "\e[33m> [3] post-start script\e[0m";
@bash ./metactl/post-start.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
@echo -e "\e[0m";
start:
@test "`docker-compose ps | wc -l`" -le "2" || (echo -e "/!\\ already running environment\n"; exit 1);
@echo -e "\e[33m> [1] pre-start script\e[0m";
@bash ./metactl/pre-start.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
@echo;
@echo -e "\e[33m> [2] Build & launch environment\e[0m";
2018-02-18 18:07:21 +00:00
@echo;
@docker-compose up -d --build && echo -e "\e[33m< done\e[0m" || (echo "\e[33m< failed\e[0m"; exit 1);
2018-02-18 18:07:21 +00:00
@echo;
@echo -e "\e[33m> [3] post-start script\e[0m";
@bash ./metactl/post-start.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
@echo -e "\e[0m";
stop:
@test "`docker-compose ps | wc -l`" -gt "2" || (echo -e "/!\\ no running environment\n"; exit 1);
@echo -e "\e[33m> [1] pre-stop script\e[0m";
@bash ./metactl/pre-stop.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
2018-02-18 18:07:21 +00:00
@echo;
@echo -e "\e[33m> [2] Stop and remove environment\e[0m";
@docker-compose down --remove-orphans > /dev/null 2>&1 && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);
2018-02-18 18:07:21 +00:00
@echo;
@echo -e "\e[33m> [3] post-stop script\e[0m";
@bash ./metactl/post-stop.sh && echo -e "\e[33m< done\e[0m" || (echo -e "\e[33m< failed\e[0m"; exit 1);