Docker reorganisation (#6)

* - new file location for docker

* update of docker containers

* update readme
This commit is contained in:
2023-03-07 23:45:45 +01:00
committed by GitHub
parent 36a355f604
commit 7e242d5aa2
10 changed files with 140 additions and 92 deletions

View File

@@ -0,0 +1,21 @@
server {
listen 80 default_server;
index index.php index.html;
root /application/public;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /.ht {
deny all;
}
}

View File

@@ -0,0 +1,3 @@
FROM node:18-alpine
RUN npm install -g npm@latest

View File

@@ -0,0 +1,34 @@
FROM php:8.1-fpm-alpine
ARG XDEBUG_VERSION=3.1.6
ARG INSTALL_XDEBUG=false
ARG COMPOSER_VERSION=2.4.4
ENV COMPOSER_HOME=/application/.composer
ENV COMPOSER_MEMORY_LIMIT=-1
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
apk --no-cache add $PHPIZE_DEPS \
&& pecl install xdebug-${XDEBUG_VERSION} \
&& docker-php-ext-enable xdebug \
;fi
RUN apk update && apk upgrade \
&& apk add --no-cache pcre-dev $PHPIZE_DEPS \
icu-dev \
zip \
libzip-dev \
libpng-dev \
&& curl -sS https://getcomposer.org/installer | php -- --version="${COMPOSER_VERSION}" --install-dir=/usr/local/bin --filename=composer \
&& pecl install redis \
&& docker-php-ext-install \
mysqli \
pdo \
pdo_mysql \
zip \
gd \
bcmath \
&& docker-php-ext-configure \
zip \
&& docker-php-ext-enable \
redis

View File

@@ -0,0 +1,9 @@
[PHP]
memory_limit = 1G
[xdebug]
xdebug.client_host=host.docker.internal
xdebug.client_port=9003
xdebug.mode=debug
xdebug.start_with_request=yes
xdebug.log_level=0