presque
This commit is contained in:
@@ -33,6 +33,8 @@ services:
|
||||
- wordpress
|
||||
networks:
|
||||
- inception
|
||||
volumes:
|
||||
- wp:/var/www/html
|
||||
|
||||
volumes:
|
||||
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 mkdir /etc/ssl/certs /etc/ssl/private
|
||||
RUN mkdir -p /etc/ssl/certs /etc/ssl/private
|
||||
COPY tools/mkcert.sh /tmp/mkcert.sh
|
||||
RUN chmod +x /tmp/mkcert.sh && /tmp/mkcert.sh
|
||||
|
||||
|
||||
@@ -9,10 +9,14 @@ server {
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
location / {
|
||||
proxy_pass http://wordpress:9000;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
root /var/www/html;
|
||||
index index.php index.html;
|
||||
|
||||
location ~ \.php$ {
|
||||
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/*
|
||||
|
||||
# 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
|
||||
RUN chmod +x /setup.sh && /setup.sh
|
||||
|
||||
EXPOSE 9000
|
||||
|
||||
CMD ["php-fpm8.2", "-F"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user