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> +#+ #
|
# By: whaffman <whaffman@student.codam.nl> +#+ #
|
||||||
# +#+ #
|
# +#+ #
|
||||||
# Created: 2025/05/12 15:33:56 by whaffman #+# #+# #
|
# 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:
|
clean:
|
||||||
@echo "$(gub)Cleaning up Docker containers...$(reset)"
|
@echo "$(gub)Cleaning up Docker containers...$(reset)"
|
||||||
$(DC) down --rmi local --volumes --remove-orphans
|
$(DC) down --rmi local --volumes --remove-orphans
|
||||||
|
@echo "$(gub)Removing data directories...$(reset)"
|
||||||
@rm -rf $(DATA_DIR)
|
@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)"
|
@echo "$(gub)Displaying all containers...$(reset)"
|
||||||
@docker ps -a
|
@docker ps -a
|
||||||
|
|
||||||
|
|
||||||
remove:
|
|
||||||
@echo "$(gub)Removing Docker containers...$(reset)"
|
|
||||||
@$(DC) rm -f
|
|
||||||
@docker volume rm -f
|
|
||||||
@$(DC) network rm -f
|
|
||||||
|
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
|
|
||||||
green:=$(shell tput setaf 2)
|
green:=$(shell tput setaf 2)
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
mariadb:
|
mariadb:
|
||||||
container_name: mariadb
|
container_name: mariadb
|
||||||
|
image: mariadb
|
||||||
build:
|
build:
|
||||||
context: ./requirements/mariadb
|
context: ./requirements/mariadb
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@ -13,10 +14,11 @@ services:
|
|||||||
- docker-network
|
- docker-network
|
||||||
volumes:
|
volumes:
|
||||||
- data_mariadb:/var/lib/mysql
|
- data_mariadb:/var/lib/mysql
|
||||||
restart: always
|
restart: unless-stopped
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
container_name: nginx
|
container_name: nginx
|
||||||
|
image: nginx
|
||||||
build:
|
build:
|
||||||
context: ./requirements/nginx
|
context: ./requirements/nginx
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@ -32,10 +34,11 @@ services:
|
|||||||
- docker-network
|
- docker-network
|
||||||
volumes:
|
volumes:
|
||||||
- data_wordpress:/var/www/html
|
- data_wordpress:/var/www/html
|
||||||
restart: always
|
restart: unless-stopped
|
||||||
|
|
||||||
wordpress:
|
wordpress:
|
||||||
container_name: wordpress
|
container_name: wordpress
|
||||||
|
image: wordpress
|
||||||
build:
|
build:
|
||||||
context: ./requirements/wordpress
|
context: ./requirements/wordpress
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@ -66,7 +69,7 @@ services:
|
|||||||
- docker-network
|
- docker-network
|
||||||
volumes:
|
volumes:
|
||||||
- data_wordpress:/var/www/html
|
- data_wordpress:/var/www/html
|
||||||
restart: always
|
restart: unless-stopped
|
||||||
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user