new start for docker

This commit is contained in:
Colmaris 2024-12-20 22:46:09 +01:00
parent 6bac181fbc
commit 48aaaaf9bb
10 changed files with 0 additions and 62 deletions

BIN
.DS_Store vendored

Binary file not shown.

View file

@ -1,21 +0,0 @@
# Utiliser une image de base officielle de PHP avec FPM (FastCGI Process Manager)
FROM php:8.1-fpm
# Installer les dépendances nécessaires pour PHP
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libzip-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install zip
# Copier le code source de l'application PHP dans le conteneur
COPY ./src /var/www/html
# Définir le répertoire de travail
WORKDIR /var/www/html
# Exposer le port 9000 pour PHP-FPM
EXPOSE 9000

View file

Before

Width:  |  Height:  |  Size: 326 KiB

After

Width:  |  Height:  |  Size: 326 KiB

View file

Before

Width:  |  Height:  |  Size: 461 KiB

After

Width:  |  Height:  |  Size: 461 KiB

View file

@ -1,19 +0,0 @@
services:
php:
build:
context: .
dockerfile: /docker/Dockerfile
volumes:
- .:/var/www/html
expose:
- "9000"
nginx:
image: nginx:alpine
volumes:
- .:/var/www/html
- ./nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- "80:80"
depends_on:
- php

View file

@ -1,22 +0,0 @@
server {
listen 80;
server_name localhost;
root /var/www/html;
index index.php index.html;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}