presque
This commit is contained in:
@@ -8,4 +8,9 @@ down:
|
|||||||
|
|
||||||
re: down all
|
re: down all
|
||||||
|
|
||||||
.PHONY: all down re
|
prune:
|
||||||
|
docker system prune -a --volumes
|
||||||
|
rm -rf /home/yantoine/data/db
|
||||||
|
rm -rf /home/yantoine/data/wp
|
||||||
|
|
||||||
|
.PHONY: all down re prune
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ services:
|
|||||||
- wordpress
|
- wordpress
|
||||||
networks:
|
networks:
|
||||||
- inception
|
- inception
|
||||||
|
volumes:
|
||||||
|
- wp:/var/www/html
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
db:
|
db:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ FROM debian:12.5-slim
|
|||||||
|
|
||||||
RUN apt-get update && apt-get install -y nginx openssl && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install -y nginx openssl && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN mkdir /etc/ssl/certs /etc/ssl/private
|
RUN mkdir -p /etc/ssl/certs /etc/ssl/private
|
||||||
COPY tools/mkcert.sh /tmp/mkcert.sh
|
COPY tools/mkcert.sh /tmp/mkcert.sh
|
||||||
RUN chmod +x /tmp/mkcert.sh && /tmp/mkcert.sh
|
RUN chmod +x /tmp/mkcert.sh && /tmp/mkcert.sh
|
||||||
|
|
||||||
|
|||||||
@@ -9,10 +9,14 @@ server {
|
|||||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://wordpress:9000;
|
root /var/www/html;
|
||||||
proxy_set_header Host $host;
|
index index.php index.html;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
location ~ \.php$ {
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
include fastcgi_params;
|
||||||
|
fastcgi_pass wordpress:9000;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,16 @@ FROM debian:12.5-slim
|
|||||||
|
|
||||||
RUN apt-get update && apt-get install -y php-fpm php-mysql curl && rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && apt-get install -y php-fpm php-mysql curl && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Force PHP-FPM à écouter sur le port TCP 9000
|
||||||
|
RUN sed -i 's/listen = \/run\/php\/php8.2-fpm.sock/listen = 0.0.0.0:9000/' /etc/php/8.2/fpm/pool.d/www.conf
|
||||||
|
|
||||||
|
# Créer le dossier AVANT de lancer le script
|
||||||
|
RUN mkdir -p /var/www/html
|
||||||
|
|
||||||
COPY tools/setup.sh /setup.sh
|
COPY tools/setup.sh /setup.sh
|
||||||
RUN chmod +x /setup.sh && /setup.sh
|
RUN chmod +x /setup.sh && /setup.sh
|
||||||
|
|
||||||
EXPOSE 9000
|
EXPOSE 9000
|
||||||
|
|
||||||
CMD ["php-fpm8.2", "-F"]
|
CMD ["php-fpm8.2", "-F"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user