2018-02-18 14:28:52 +00:00
|
|
|
start:
|
2018-03-15 11:11:06 +00:00
|
|
|
@test "`docker-compose ps | wc -l`" -le "2" || (echo -e "/!\\ already running environment\n"; exit 1);
|
2018-03-15 11:23:11 +00:00
|
|
|
@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-03-15 11:11:06 +00:00
|
|
|
@echo;
|
2018-03-15 11:23:11 +00:00
|
|
|
@echo -e "\e[33m> [2] Build & launch environment\e[0m";
|
2018-03-15 11:11:06 +00:00
|
|
|
@echo;
|
2018-03-15 11:23:11 +00:00
|
|
|
@docker-compose up -d && echo -e "\e[33m< done\e[0m" || (echo "\e[33m< failed\e[0m"; exit 1);
|
2018-03-15 11:11:06 +00:00
|
|
|
@echo;
|
2018-03-15 11:23:11 +00:00
|
|
|
@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";
|
2018-03-15 11:11:06 +00:00
|
|
|
|
|
|
|
start-no-log:
|
2018-02-18 18:36:35 +00:00
|
|
|
@test "`docker-compose ps | wc -l`" -le "2" || (echo -e "/!\\ already running environment\n"; exit 1);
|
2018-03-15 11:23:11 +00:00
|
|
|
@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;
|
2018-03-15 11:23:11 +00:00
|
|
|
@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;
|
2018-03-15 11:23:11 +00:00
|
|
|
@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";
|
2018-02-18 14:28:52 +00:00
|
|
|
|
2018-03-15 11:23:11 +00:00
|
|
|
start:
|
2018-02-18 18:36:35 +00:00
|
|
|
@test "`docker-compose ps | wc -l`" -le "2" || (echo -e "/!\\ already running environment\n"; exit 1);
|
2018-03-15 11:23:11 +00:00
|
|
|
@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;
|
2018-03-15 11:23:11 +00:00
|
|
|
@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;
|
2018-03-15 11:23:11 +00:00
|
|
|
@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";
|
2018-02-18 17:41:16 +00:00
|
|
|
|
2018-02-18 14:28:52 +00:00
|
|
|
stop:
|
2018-02-18 18:36:35 +00:00
|
|
|
@test "`docker-compose ps | wc -l`" -gt "2" || (echo -e "/!\\ no running environment\n"; exit 1);
|
2018-03-15 11:23:11 +00:00
|
|
|
@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;
|
2018-03-15 11:23:11 +00:00
|
|
|
@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;
|
2018-03-15 11:23:11 +00:00
|
|
|
@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);
|