Add project files
This commit is contained in:
17
php-compose-project/docker/nginx/default.conf
Normal file
17
php-compose-project/docker/nginx/default.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
root /var/www/html;
|
||||
index index.php index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
27
php-compose-project/docker/php/Dockerfile
Normal file
27
php-compose-project/docker/php/Dockerfile
Normal file
@@ -0,0 +1,27 @@
|
||||
FROM php:8.1-fpm
|
||||
|
||||
# Abhängigkeiten installieren
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libpng-dev \
|
||||
libzip-dev \
|
||||
zip \
|
||||
unzip
|
||||
|
||||
# PHP Extensions installieren
|
||||
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install -j$(nproc) \
|
||||
gd \
|
||||
pdo \
|
||||
pdo_mysql \
|
||||
zip
|
||||
|
||||
# OPCache für Produktion aktivieren
|
||||
RUN docker-php-ext-install opcache \
|
||||
&& docker-php-ext-enable opcache
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
# Standard-Konfiguration für Produktion
|
||||
COPY php.ini-production /usr/local/etc/php/php.ini
|
||||
30
php-compose-project/docker/php/Dockerfile.dev
Normal file
30
php-compose-project/docker/php/Dockerfile.dev
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM php:8.1-fpm
|
||||
|
||||
# Abhängigkeiten installieren
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libpng-dev \
|
||||
libzip-dev \
|
||||
zip \
|
||||
unzip
|
||||
|
||||
# PHP Extensions installieren
|
||||
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install -j$(nproc) \
|
||||
gd \
|
||||
pdo \
|
||||
pdo_mysql \
|
||||
zip
|
||||
|
||||
# Development-Konfiguration
|
||||
COPY php.ini-development /usr/local/etc/php/php.ini
|
||||
|
||||
# Xdebug installieren
|
||||
RUN pecl install xdebug \
|
||||
&& docker-php-ext-enable xdebug
|
||||
|
||||
# Xdebug-Konfiguration kopieren
|
||||
COPY xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
WORKDIR /var/www/html
|
||||
7
php-compose-project/docker/php/xdebug.ini
Normal file
7
php-compose-project/docker/php/xdebug.ini
Normal file
@@ -0,0 +1,7 @@
|
||||
zend_extension=xdebug
|
||||
|
||||
xdebug.mode=develop,debug
|
||||
xdebug.start_with_request=yes
|
||||
xdebug.client_host=host.docker.internal
|
||||
xdebug.client_port=9003
|
||||
xdebug.log=/var/log/xdebug.log
|
||||
Reference in New Issue
Block a user