init
This commit is contained in:
35
docker/php/dev/Dockerfile
Normal file
35
docker/php/dev/Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
# hadolint global ignore=DL3008
|
||||
FROM php:8.4-fpm
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libpq-dev \
|
||||
libsqlite3-dev \
|
||||
libzip-dev \
|
||||
libxml2-dev \
|
||||
libicu-dev \
|
||||
libpng-dev \
|
||||
libjpeg-dev \
|
||||
libfreetype-dev \
|
||||
libmagickwand-dev \
|
||||
unzip \
|
||||
qpdf \
|
||||
curl \
|
||||
python3 \
|
||||
python3-pip \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install \
|
||||
pdo_mysql \
|
||||
pdo_pgsql \
|
||||
pdo_sqlite \
|
||||
zip \
|
||||
intl \
|
||||
gd \
|
||||
&& pecl install redis imagick pcov \
|
||||
&& docker-php-ext-enable redis imagick pcov \
|
||||
&& groupadd -g 1000 appuser && useradd -u 1000 -g appuser -m appuser
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
USER appuser
|
||||
35
docker/php/prod/Dockerfile
Normal file
35
docker/php/prod/Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
||||
# hadolint global ignore=DL3008
|
||||
FROM php:8.4-fpm
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libpq-dev \
|
||||
libsqlite3-dev \
|
||||
libzip-dev \
|
||||
libxml2-dev \
|
||||
libicu-dev \
|
||||
libpng-dev \
|
||||
libjpeg-dev \
|
||||
libfreetype-dev \
|
||||
libmagickwand-dev \
|
||||
unzip \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install \
|
||||
pdo_mysql \
|
||||
pdo_pgsql \
|
||||
pdo_sqlite \
|
||||
zip \
|
||||
intl \
|
||||
gd \
|
||||
exif \
|
||||
opcache \
|
||||
&& pecl install redis imagick \
|
||||
&& docker-php-ext-enable redis imagick \
|
||||
&& groupadd -g 1000 appuser && useradd -u 1000 -g appuser -m appuser
|
||||
|
||||
COPY php.ini /usr/local/etc/php/conf.d/app.ini
|
||||
COPY opcache.ini /usr/local/etc/php/conf.d/opcache.ini
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
USER appuser
|
||||
9
docker/php/prod/opcache.ini
Normal file
9
docker/php/prod/opcache.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
opcache.enable=1
|
||||
opcache.memory_consumption=256
|
||||
opcache.interned_strings_buffer=16
|
||||
opcache.max_accelerated_files=20000
|
||||
opcache.validate_timestamps=0
|
||||
opcache.save_comments=0
|
||||
opcache.enable_cli=1
|
||||
opcache.jit=tracing
|
||||
opcache.jit_buffer_size=128M
|
||||
21
docker/php/prod/php.ini
Normal file
21
docker/php/prod/php.ini
Normal file
@@ -0,0 +1,21 @@
|
||||
date.timezone = Europe/Paris
|
||||
|
||||
memory_limit = 256M
|
||||
upload_max_filesize = 100M
|
||||
post_max_size = 150M
|
||||
max_execution_time = 30
|
||||
max_input_time = 30
|
||||
|
||||
expose_php = Off
|
||||
display_errors = Off
|
||||
display_startup_errors = Off
|
||||
log_errors = On
|
||||
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
|
||||
|
||||
realpath_cache_size = 4096K
|
||||
realpath_cache_ttl = 600
|
||||
|
||||
session.cookie_secure = On
|
||||
session.cookie_httponly = On
|
||||
session.cookie_samesite = Lax
|
||||
session.use_strict_mode = 1
|
||||
Reference in New Issue
Block a user