makefile aanpassingen en restart opties
This commit is contained in:
parent
1bc7d4bb6f
commit
401cdfb6c5
17
Makefile
17
Makefile
@ -6,7 +6,7 @@
|
||||
# By: whaffman <whaffman@student.codam.nl> +#+ #
|
||||
# +#+ #
|
||||
# Created: 2025/05/12 15:33:56 by whaffman #+# #+# #
|
||||
# Updated: 2025/05/22 10:06:24 by whaffman ######## odam.nl #
|
||||
# Updated: 2025/05/22 10:25:47 by whaffman ######## odam.nl #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
@ -52,7 +52,14 @@ down:
|
||||
clean:
|
||||
@echo "$(gub)Cleaning up Docker containers...$(reset)"
|
||||
$(DC) down --rmi local --volumes --remove-orphans
|
||||
@echo "$(gub)Removing data directories...$(reset)"
|
||||
@rm -rf $(DATA_DIR)
|
||||
@echo "$(gub)Removing Docker networks...$(reset)"
|
||||
@docker network prune -f
|
||||
@echo "$(gub)Removing Docker volumes...$(reset)"
|
||||
@docker volume prune -f
|
||||
@echo "$(gub)Removing Docker images...$(reset)"
|
||||
@docker rmi -f $(shell docker images -q)
|
||||
|
||||
|
||||
|
||||
@ -72,14 +79,6 @@ ps:
|
||||
@echo "$(gub)Displaying all containers...$(reset)"
|
||||
@docker ps -a
|
||||
|
||||
|
||||
remove:
|
||||
@echo "$(gub)Removing Docker containers...$(reset)"
|
||||
@$(DC) rm -f
|
||||
@docker volume rm -f
|
||||
@$(DC) network rm -f
|
||||
|
||||
|
||||
# Colors
|
||||
|
||||
green:=$(shell tput setaf 2)
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
services:
|
||||
mariadb:
|
||||
container_name: mariadb
|
||||
image: mariadb
|
||||
build:
|
||||
context: ./requirements/mariadb
|
||||
dockerfile: Dockerfile
|
||||
@ -13,10 +14,11 @@ services:
|
||||
- docker-network
|
||||
volumes:
|
||||
- data_mariadb:/var/lib/mysql
|
||||
restart: always
|
||||
restart: unless-stopped
|
||||
|
||||
nginx:
|
||||
container_name: nginx
|
||||
image: nginx
|
||||
build:
|
||||
context: ./requirements/nginx
|
||||
dockerfile: Dockerfile
|
||||
@ -32,10 +34,11 @@ services:
|
||||
- docker-network
|
||||
volumes:
|
||||
- data_wordpress:/var/www/html
|
||||
restart: always
|
||||
restart: unless-stopped
|
||||
|
||||
wordpress:
|
||||
container_name: wordpress
|
||||
image: wordpress
|
||||
build:
|
||||
context: ./requirements/wordpress
|
||||
dockerfile: Dockerfile
|
||||
@ -66,7 +69,7 @@ services:
|
||||
- docker-network
|
||||
volumes:
|
||||
- data_wordpress:/var/www/html
|
||||
restart: always
|
||||
restart: unless-stopped
|
||||
|
||||
|
||||
networks:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user