new start for docker
This commit is contained in:
parent
6bac181fbc
commit
48aaaaf9bb
10 changed files with 0 additions and 62 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
21
Dockerfile
21
Dockerfile
|
@ -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
|
Before Width: | Height: | Size: 326 KiB After Width: | Height: | Size: 326 KiB |
Before Width: | Height: | Size: 461 KiB After Width: | Height: | Size: 461 KiB |
|
@ -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
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue