trying to understand why ports dont work
This commit is contained in:
16
Makefile
16
Makefile
@@ -22,7 +22,7 @@ RESET = "\e[0m"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||
|
||||
COMPOSE = ./srcs/docker-compose.yml
|
||||
COMPOSE_FILE = ./srcs/docker-compose.yml
|
||||
|
||||
# in makefile you can use an env variable directly as a make variable :
|
||||
# -> https://ftp.gnu.org/old-gnu/Manuals/make-3.79.1/html_chapter/make_6.html#SEC68
|
||||
@@ -90,6 +90,7 @@ VOLUMES = $(shell docker volume ls -q)
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
|
||||
|
||||
all: require build up
|
||||
logs: require build_logs up
|
||||
|
||||
require:
|
||||
# remove all the lines starting with "HOST_VOLUME_" in .env
|
||||
@@ -101,9 +102,6 @@ require:
|
||||
# create the volumes directories
|
||||
@echo $(B_PURPLE)"create the volumes directories"$(RESET)
|
||||
@mkdir -p $(VOLUMES_D)
|
||||
# create the ssl folder to avoid pbm at nginx docker creation
|
||||
@echo $(B_PURPLE)"create the ssl folder"$(RESET)
|
||||
@mkdir -p ./srcs/requirements/nginx/conf/ssl
|
||||
# verify if the wordpress url is added to the local path
|
||||
@echo $(B_PURPLE)"verify if the wordpress url is added to the local path"$(RESET)
|
||||
@- if ! grep "127.0.0.1 $(WP_URL)" /etc/hosts 2> /dev/null; then \
|
||||
@@ -112,14 +110,18 @@ require:
|
||||
fi
|
||||
|
||||
build:
|
||||
docker compose -f $(COMPOSE) build
|
||||
docker compose -f $(COMPOSE_FILE) build
|
||||
# --progress plain : everything will be output at build time, you can see commands like "echo" or "ls" in RUN command in dockerfile
|
||||
# --no-cache : this will prevent builder to use previous cached action, so it rebuild everything
|
||||
build_logs:
|
||||
docker compose -f $(COMPOSE_FILE) build --progress plain --no-cache
|
||||
|
||||
up:
|
||||
docker compose -f $(COMPOSE) up -d
|
||||
docker compose -f $(COMPOSE_FILE) up -d
|
||||
@echo $(B_PURPLE)"you can now connect at "$(B_YELLOW)"https://$(WP_URL)"$(B_PURPLE)" or 127.0.0.1"$(RESET)
|
||||
|
||||
down:
|
||||
docker compose -f $(COMPOSE) down
|
||||
docker compose -f $(COMPOSE_FILE) down
|
||||
|
||||
# list images, containers, volumes
|
||||
list:
|
||||
|
||||
Reference in New Issue
Block a user