n'importe tu sais: nginx
This commit is contained in:
parent
6c6032585f
commit
d012f6db49
16
Makefile
16
Makefile
@ -1,11 +1,13 @@
|
||||
USERNAME = cchauvet
|
||||
|
||||
all: up
|
||||
|
||||
build:
|
||||
docker build -t ${USERNAME}/nginx srcs/nginx/
|
||||
|
||||
run:
|
||||
docker-compose up -d srcs/docker-compose.yml
|
||||
docker-compose -f srcs/docker-compose.yml up --build -d
|
||||
|
||||
up: build run
|
||||
fclean:
|
||||
-docker rm -f `docker ps -aq`
|
||||
-docker volume rm -f `docker volume ls -q`
|
||||
-docker image rm -f `docker image ls -aq`
|
||||
-docker network rm -f `docker network ls -q`
|
||||
-docker builder prune --all --force
|
||||
|
||||
up: run
|
||||
|
@ -1,6 +1,6 @@
|
||||
services:
|
||||
nginx:
|
||||
image: cchauvet/nginx
|
||||
image: nginx
|
||||
build: nginx
|
||||
ports:
|
||||
- "443:443"
|
||||
|
@ -8,6 +8,6 @@ RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
|
||||
-out /etc/ssl/certs/nginx-selfsigned.crt \
|
||||
-subj "/C=FR/ST=Nouvelle Aquitaine/L=Angouleme/O=42 Angouleme/CN=cchauvet.42.fr"
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY nginx.conf /etc/nginx/http.d/default.conf
|
||||
|
||||
ENTRYPOINT ["nginx"]
|
||||
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
||||
|
@ -1,25 +1,15 @@
|
||||
events
|
||||
{
|
||||
}
|
||||
|
||||
http
|
||||
{
|
||||
server {
|
||||
listen 443; # Port d'écoute HTTP par défaut
|
||||
listen 443 ssl;
|
||||
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
|
||||
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
|
||||
|
||||
server_name votre_domaine.com; # Remplacez par votre nom de domaine
|
||||
root /var/www/html;
|
||||
|
||||
root /var/www/html; # Répertoire racine du site web
|
||||
|
||||
index index.html; # Page d'index par défaut
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404; # Gère les requêtes pour les fichiers statiques
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
daemon off;
|
||||
|
Loading…
Reference in New Issue
Block a user