Docker Implementation

This commit is contained in:
Hosteroid
2025-10-23 00:56:29 +03:00
parent fa0167bf71
commit 75f0ae35fb
7 changed files with 444 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
# Latest stable PHP + Apache
FROM php:apache
# Build deps for requested PHP extensions
RUN apt-get update && apt-get install -y --no-install-recommends \
libicu-dev libzip-dev libpng-dev libjpeg62-turbo-dev libfreetype6-dev \
libxml2-dev libcurl4-openssl-dev libonig-dev pkg-config unzip git tzdata \
&& docker-php-ext-configure gd --with-jpeg --with-freetype \
&& docker-php-ext-install -j"$(nproc)" \
pdo pdo_mysql mysqli intl zip gd bcmath mbstring curl xml \
&& a2enmod rewrite headers \
&& rm -rf /var/lib/apt/lists/*
# Set Apache DocumentRoot to /var/www/html/public
ARG APACHE_DOCUMENT_ROOT=/var/www/html/public
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/000-default.conf
# Apache timeout only (no proxy needed)
RUN set -eux; \
echo "Timeout 300" > /etc/apache2/conf-available/timeouts.conf; \
a2enconf timeouts
WORKDIR /var/www/html

View File

@@ -0,0 +1,20 @@
; ---- PHP limits (as requested) ----
max_execution_time = 0
max_input_time = -1
max_input_vars = 3000
memory_limit = 512M
post_max_size = 32M
upload_max_filesize = 16M
default_socket_timeout = 120
; Recommended defaults
date.timezone = UTC
display_errors = On
error_reporting = E_ALL
; Opcache (safe defaults)
opcache.enable=1
opcache.enable_cli=1
opcache.validate_timestamps=1
opcache.revalidate_freq=2