Compare commits
No commits in common. "f9e2e647501fdbd079db5cc13557416b726c7782" and "81ddf62aec58f3de68adcaf2879cd3a6679b7ad2" have entirely different histories.
f9e2e64750
...
81ddf62aec
55
Makefile
55
Makefile
@ -6,62 +6,17 @@
|
|||||||
# 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/19 13:22:28 by whaffman ######## odam.nl #
|
# Updated: 2025/05/12 15:35:21 by whaffman ######## odam.nl #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
DOCKER_COMPOSE = docker compose
|
|
||||||
DOCKER_COMPOSE_FILE = ./srcs/docker-compose.yml
|
|
||||||
DOCKER_ENV_FILE = ./srcs/.env
|
|
||||||
|
|
||||||
DC = $(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) --env-file $(DOCKER_ENV_FILE)
|
|
||||||
|
|
||||||
.PHONY: all build up down remove
|
|
||||||
|
|
||||||
all: build up
|
|
||||||
build:
|
|
||||||
@echo "$(gub)Building Docker containers...$(reset)"
|
|
||||||
$(DC) build
|
|
||||||
up:
|
up:
|
||||||
@echo "$(gub)Starting Docker containers...$(reset)"
|
docker-compose up -d --build
|
||||||
$(DC) up -d --build
|
|
||||||
|
|
||||||
down:
|
down:
|
||||||
@echo "$(gub)Stopping Docker containers...$(reset)"
|
docker-compose down
|
||||||
$(DC) down
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@echo "$(gub)Cleaning up Docker containers...$(reset)"
|
|
||||||
$(DC) down --rmi local --volumes --remove-orphans
|
|
||||||
|
|
||||||
logs:
|
|
||||||
@echo "$(gub)Displaying logs...$(reset)"
|
|
||||||
@$(DC) logs
|
|
||||||
|
|
||||||
ps:
|
|
||||||
@echo "$(gub)Displaying running containers...$(reset)"
|
|
||||||
@$(DC) ps
|
|
||||||
@echo "$(gub)Displaying networks...$(reset)"
|
|
||||||
@docker network ls
|
|
||||||
@echo "$(gub)Displaying volumes...$(reset)"
|
|
||||||
@docker volume ls
|
|
||||||
@echo "$(gub)Displaying images...$(reset)"
|
|
||||||
@docker images
|
|
||||||
@echo "$(gub)Displaying all containers...$(reset)"
|
|
||||||
@docker ps -a
|
|
||||||
|
|
||||||
|
|
||||||
remove:
|
remove:
|
||||||
@echo "$(gub)Removing Docker containers...$(reset)"
|
docker-compose down --rmi all
|
||||||
@$(DC) rm -f
|
@docker volume rm $(shell docker volume ls -qf dangling=true) || true
|
||||||
@$(DC) volume rm -f
|
|
||||||
@$(DC) network rm -f
|
|
||||||
|
|
||||||
|
|
||||||
# Colors
|
|
||||||
|
|
||||||
green:=$(shell tput setaf 2)
|
|
||||||
bold:=$(shell tput bold)
|
|
||||||
uncerline:=$(shell tput smul)
|
|
||||||
gub:=$(green)$(underline)$(bold)
|
|
||||||
reset:=$(shell tput sgr0)
|
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
FROM alpine:3.20
|
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
|
||||||
nginx \
|
|
||||||
rm -rf /var/cache/apk/*
|
|
||||||
|
|
||||||
COPY
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name ${DOMAIN_NAME};
|
|
||||||
root /var/www/html/wordpress;
|
|
||||||
|
|
||||||
access_log /var/log/nginx/example.${DOMAIN_NAME}-access.log;
|
|
||||||
error_log /var/log/nginx/example.${DOMAIN_NAME}-error.log error;
|
|
||||||
index index.html index.htm index.php;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ /index.php$is_args$args;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ \.php$ {
|
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
||||||
fastcgi_pass wordpress:9000;
|
|
||||||
fastcgi_index index.php;
|
|
||||||
include fastcgi.conf;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user