there is a map with a marker, and the docker don't generate a new certificate all the time
This commit is contained in:
19
Makefile
19
Makefile
@@ -24,9 +24,10 @@ RESET = "\e[0m"
|
||||
|
||||
COMPOSE = ./srcs/docker-compose.yml
|
||||
|
||||
VOLUME_PATH = $(shell grep -w "MAP_VOLUMES" ./srcs/.env | cut -d "=" -f 2)
|
||||
VOLUMES_D = $(VOLUME_PATH)/wp_volume \
|
||||
$(VOLUME_PATH)/db_volume
|
||||
VOLUMES_D = $(shell grep "^HOST_VOLUME" ./srcs/.env | cut -d "=" -f 2)
|
||||
#VOLUME_PATH = $(shell grep "^HOST_VOLUME" ./srcs/.env | cut -d "=" -f 2)
|
||||
#VOLUMES_D = $(VOLUME_PATH)/wp_volume \
|
||||
# $(VOLUME_PATH)/db_volume
|
||||
WP_URL = $(shell grep "WP_URL" ./srcs/.env | cut -d "=" -f 2)
|
||||
|
||||
# list of running containers, see : https://stackoverflow.com/questions/10024279/how-to-use-shell-commands-in-makefile
|
||||
@@ -37,18 +38,18 @@ VOLUMES = $(shell docker volume ls -q)
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||
|
||||
all: build up
|
||||
all: volumes build up
|
||||
|
||||
volumes:
|
||||
mkdir -p $(VOLUMES_D)
|
||||
|
||||
build:
|
||||
- if ! grep "127.0.0.1 ${WP_URL}" /etc/hosts 2> /dev/null; then \
|
||||
- if ! grep "127.0.0.1 $(WP_URL)" /etc/hosts 2> /dev/null; then \
|
||||
bash -c 'echo -e "\n# adding for inception (you can delete it)\n127.0.0.1 $(WP_URL)" >> /etc/hosts'; \
|
||||
fi
|
||||
docker-compose -f $(COMPOSE) build
|
||||
|
||||
up: volumes
|
||||
up:
|
||||
docker-compose -f $(COMPOSE) up -d
|
||||
|
||||
down:
|
||||
@@ -86,8 +87,8 @@ re: fclean all
|
||||
|
||||
# !! remove everything everything
|
||||
erase_v:
|
||||
- rm -rf ${VOLUMES_D}
|
||||
hard: erase_v re
|
||||
- rm -rf $(VOLUMES_D)
|
||||
new: erase_v re
|
||||
|
||||
.PHONY : all $(VOLUMES_D) build up list clean fclean re
|
||||
.PHONY : all $(VOLUMES_D) build up list clean fclean re erase_v new
|
||||
|
||||
|
||||
Reference in New Issue
Block a user