nginx cleaned and works with alpine (45s instead of 180s, 4 times faster

+ in Makefile resolved super-clean rule
+ wordpress and mariadb pbm connections
This commit is contained in:
hugo gogo
2022-09-17 19:39:49 +02:00
parent a676b6cffe
commit 1e3d9aec30
6 changed files with 172 additions and 30 deletions

View File

@@ -22,23 +22,26 @@ RESET = "\e[0m"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
COMPOSE = ./srcs/docker-compose.yml
COMPOSE = ./srcs/docker-compose.yml
IMAGES = nginx \
IMAGES = nginx \
mariadb \
wordpress
HOME_D = $(shell echo $(HOME))
HOME_D = $(shell echo $(HOME))
VOLUMES_D = $(VOLUMES:%=$(HOME_D)/%)
VOLUMES = v_wp_site \
VOLUMES_D = $(VOLUMES:%=$(HOME_D)/%)
VOLUMES = v_wp_site \
v_wp_db
CONTAINERS = $(IMAGES:%=my%)
CONTAINERS = $(IMAGES:%=my%)
CONT = mytest
CONT = mytest
SUDO =
SUDO =
# for rule super-clean, see : https://stackoverflow.com/questions/10024279/how-to-use-shell-commands-in-makefile
STOP = $(shell $(SUDO) docker ps -q)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
@@ -95,7 +98,7 @@ fclean: rm-images clean rm-volumes
# remove all dockers, even not related to the project
super-clean:
- $(SUDO) docker stop $(sudo docker ps -q)
- $(SUDO) docker stop $(STOP)
$(SUDO) docker system prune -af --volumes
/bin/rm -rf $(VOLUMES_D)