「🏗️」 wip: work in progress, not done yet.
This commit is contained in:
8
docker/php/Dockerfile
Normal file
8
docker/php/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM php:8.4-fpm-alpine
|
||||
|
||||
# Installez les dépendances nécessaires pour la compilation d'extensions PHP
|
||||
RUN apk --no-cache add \
|
||||
sqlite \
|
||||
sqlite-dev
|
||||
|
||||
RUN mkdir -p /var/www/db && chown -R www-data:www-data /var/www/db
|
23
docker/web/Dockerfile
Normal file
23
docker/web/Dockerfile
Normal file
@ -0,0 +1,23 @@
|
||||
FROM nginx:alpine
|
||||
|
||||
RUN apk update && apk add --no-cache \
|
||||
php84 \
|
||||
php84-fpm \
|
||||
php84-opcache \
|
||||
php84-mysqli \
|
||||
php84-pdo \
|
||||
php84-pdo_mysql \
|
||||
php84-json \
|
||||
php84-cli \
|
||||
php84-common \
|
||||
php84-mbstring \
|
||||
php84-xml \
|
||||
php84-curl
|
||||
|
||||
COPY ./site /var/www/html
|
||||
COPY ./docker/web/http-conf/pressf.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
RUN mkdir -p /var/www/db
|
||||
RUN chown -R nginx:nginx /var/www/db
|
||||
|
||||
VOLUME ["/var/www/html", "/var/db"]
|
36
docker/web/http-conf/pressf.conf
Normal file
36
docker/web/http-conf/pressf.conf
Normal file
@ -0,0 +1,36 @@
|
||||
server {
|
||||
listen 0.0.0.0:80; # Écouter sur toutes les interfaces réseau (IPv4)
|
||||
|
||||
# Répertoire de travail de Nginx
|
||||
root /var/www/html;
|
||||
index index.php index.html;
|
||||
|
||||
# Gestion des fichiers PHP avec le socket Unix
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_index index.php;
|
||||
|
||||
# Paramètre de chemin de fichier pour le traitement PHP
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param DOCUMENT_ROOT $document_root;
|
||||
|
||||
# Inclure les paramètres FastCGI standard
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
# Serveur de fichiers statiques (images, CSS, JS, etc.)
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
# Gestion du favicon
|
||||
location = /favicon.ico {
|
||||
root /var/www/html;
|
||||
}
|
||||
|
||||
# Gestion des erreurs 404
|
||||
error_page 404 /404.html;
|
||||
location = /404.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user