Projet 42:
Sujet: Conteneuriser un serveur wordpress à l'aide de docker, alpine/debian, nginx et mariadb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
NAME = inception
|
|
|
|
DATA_FOLDER = /home/narnaud/data
|
|
|
|
CERT = $(DATA_FOLDER)/ssl/inception.pem
|
|
|
|
|
|
|
|
all: prune start
|
|
|
|
|
|
|
|
domain:
|
|
|
|
echo "127.0.0.1 narnaud.42.fr" >> /etc/hosts
|
|
|
|
|
|
|
|
$(CERT):
|
|
|
|
mkdir -p $(DATA_FOLDER)/ssl
|
|
|
|
openssl req -newkey rsa:4096 -x509 -sha256 -days 365 -nodes \
|
|
|
|
-out inception.pem -keyout inception.pem \
|
|
|
|
-subj "/C=FR/ST=Nice/L=Nice/O=42/OU=student/CN=inception_narnaud/"
|
|
|
|
|
|
|
|
start: $(CERT)
|
|
|
|
BUILDKIT_PROGRESS=plain docker compose -f srcs/docker-compose.yml up --build
|
|
|
|
|
|
|
|
stop:
|
|
|
|
docker compose -f srcs/docker-compose.yml down
|
|
|
|
|
|
|
|
prune: stop
|
|
|
|
docker system prune -f
|
|
|
|
|
|
|
|
fclean: prune
|
|
|
|
docker system prune -af
|
|
|
|
|
|
|
|
re: fclean start
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: domain start stop fclean prune all
|