# TODO(vm) data is supposed to be in $HOME/data/ BUILD_PATH=__build/ DOCKER=docker SRC_COMPOSE=srcs/ SRC_WWW_MORE=srcs/www/ .ONESHELL : .SHELLFLAGS = -eu -c .PHONY : run reset re help ### pretty logs #### _ECHO = echoo(){ \ if [ -t 1 ]; then \ echo "\e[30;47;1m$$*\e[0m"; \ else \ echo "$$*"; \ fi; \ } ## Run the compose. run : @$(_ECHO) echoo "Running '$(SRC_COMPOSE)'..." cd -- $(SRC_COMPOSE) $(DOCKER) compose up --build cd - ## Remove all content of the website. reset : @$(_ECHO) echoo "Removing all data..." cd -- $(SRC_COMPOSE) docker compose down -v cd - ## 'reset' then 'run' re : reset run @$(_ECHO) echo echo "run \`make\` or \`make run\` to run the docker." ## Show help help : @$(_ECHO) echo echo "run Run the compose." echo "reset Remove all content of the website." echo "re 'reset' then 'run'." echo