diff --git a/8.2-kazza/Dockerfile b/8.2-kazza/Dockerfile deleted file mode 100644 index a81cfaa..0000000 --- a/8.2-kazza/Dockerfile +++ /dev/null @@ -1,61 +0,0 @@ -ARG PHP_VERSION=8.2 -ARG CADDY_VERSION=2 - -# ----------------------------------------------------- -# Caddy Install -# ----------------------------------------------------- -FROM caddy:$CADDY_VERSION-builder AS builder -ARG TARGETPLATFORM -ARG BUILDPLATFORM -ARG TARGETOS -ARG TARGETARCH - -RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH xcaddy build - -# ----------------------------------------------------- -# App Itself -# ----------------------------------------------------- -FROM php:$PHP_VERSION-fpm-alpine - -ARG PORT=9001 -ARG PUBLIC_DIR=public - -ENV PORT=$PORT -ENV PUBLIC_DIR=$PUBLIC_DIR - -ENV REQUIRED_PACKAGES="git make zip curl nodejs npm ffmpeg libpq supervisor gettext acl fcgi python3 ca-certificates pcre rabbitmq-c icu libavif libwebp libpng freetype libjpeg-turbo libacl libheif libde265 imagemagick jpegoptim optipng pngquant gifsicle linux-headers file" -ENV EXTENSIONS="redis apcu ast maxminddb amqp zip pdo_mysql pdo_pgsql bcmath opcache gettext intl exif pcntl sysvmsg sysvsem sysvshm xsl uuid igbinary bz2 gmp imagick gd mongodb" - -ENV DOCKER=true -ENV COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_NO_INTERACTION=1 COMPOSER_CACHE_DIR="/tmp" - -WORKDIR /app - -# Copying manifest files to host -COPY ./8.2-kazza/manifest / - -# Caddy -COPY --from=builder /usr/bin/caddy /usr/local/bin/caddy - -# Composer install -COPY --from=composer/composer:2-bin /composer /usr/bin/composer - -# php extensions installer: https://github.com/mlocati/docker-php-extension-installer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions - -# Install required packages -RUN apk add --update --no-cache $REQUIRED_PACKAGES - -# Install PHP extensions -RUN install-php-extensions $EXTENSIONS - -# Fix Iconv -RUN apk add --no-cache --repository https://dl-cdn.alpinelinux.org/alpine/edge/community/ --allow-untrusted gnu-libiconv -ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php - -# Install sockets -RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install sockets && docker-php-ext-enable sockets - -# Update ulimit -RUN ulimit -n 16384 diff --git a/8.2-kazza/manifest/etc/caddy/Caddyfile b/8.2-kazza/manifest/etc/caddy/Caddyfile deleted file mode 100644 index 8b2ce3c..0000000 --- a/8.2-kazza/manifest/etc/caddy/Caddyfile +++ /dev/null @@ -1,26 +0,0 @@ -:80, :{$PORT} { - root * /app/{$PUBLIC_DIR} - - php_fastcgi 127.0.0.1:9000 { - trusted_proxies private_ranges - } - - file_server - - header / { - # Enable cross-site filter (XSS) and tell browser to block detected attacks - X-XSS-Protection "1; mode=block" - # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type - X-Content-Type-Options "nosniff" - # Disallow the site to be rendered within a frame (clickjacking protection) - X-Frame-Options "DENY" - } - - log { - output stdout - format console - } - - push - encode gzip -} diff --git a/8.2-kazza/manifest/etc/supervisor/conf.d/caddy.conf b/8.2-kazza/manifest/etc/supervisor/conf.d/caddy.conf deleted file mode 100644 index bd8dc6e..0000000 --- a/8.2-kazza/manifest/etc/supervisor/conf.d/caddy.conf +++ /dev/null @@ -1,7 +0,0 @@ -[program:caddy] -command=/usr/local/bin/caddy run --config /etc/caddy/Caddyfile --adapter caddyfile -autostart=true -autorestart=true -priority=10 -stdout_events_enabled=true -stderr_events_enabled=true diff --git a/8.2-kazza/manifest/etc/supervisor/conf.d/php-fpm.conf b/8.2-kazza/manifest/etc/supervisor/conf.d/php-fpm.conf deleted file mode 100644 index 07542e1..0000000 --- a/8.2-kazza/manifest/etc/supervisor/conf.d/php-fpm.conf +++ /dev/null @@ -1,13 +0,0 @@ -[program:php-fpm] -command=/usr/local/sbin/php-fpm -c /usr/local/etc -process_name=%(program_name)s_%(process_num)02d -priority=5 -numprocs=1 -autostart=true -autorestart=false -startsecs=0 -redirect_stderr=true -stdout_logfile=/dev/stdout -stderr_logfile=/dev/stderr -stdout_logfile_maxbytes=0 -stderr_logfile_maxbytes=0 diff --git a/8.2-kazza/manifest/etc/supervisord.conf b/8.2-kazza/manifest/etc/supervisord.conf deleted file mode 100644 index 68dc04e..0000000 --- a/8.2-kazza/manifest/etc/supervisord.conf +++ /dev/null @@ -1,28 +0,0 @@ -[unix_http_server] -file=/var/run/supervisor.sock ; (the path to the socket file) - -[supervisord] -loglevel=info ; (log level;default info; others: debug,warn,trace) -pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) -nodaemon=false ; (start in foreground if true;default false) -minfds=1024 ; (min. avail startup file descriptors;default 1024) -minprocs=200 ; (min. avail process descriptors;default 200) -user=root ; - -; the below section must remain in the config file for RPC -; (supervisorctl/web interface) to work, additional interfaces may be -; added by defining them in separate rpcinterface: sections -[rpcinterface:supervisor] -supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface - -[supervisorctl] -serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket - -; [eventlistener:stdout] -; command = supervisor_stdout -; buffer_size = 100 -; events = PROCESS_LOG -; result_handler = supervisor_stdout:event_handler - -[include] -files = /etc/supervisor/conf.d/*.conf diff --git a/8.2-kazza/manifest/usr/local/etc/php-fpm.d/docker.conf b/8.2-kazza/manifest/usr/local/etc/php-fpm.d/docker.conf deleted file mode 100644 index 629b894..0000000 --- a/8.2-kazza/manifest/usr/local/etc/php-fpm.d/docker.conf +++ /dev/null @@ -1,19 +0,0 @@ -[global] -error_log=/proc/self/fd/2 - -[www] -; access.log=/proc/self/fd/2 -access.log=/dev/null - -clear_env = no - -; Ensure worker stdout and stderr are sent to the main error log. -catch_workers_output = yes -decorate_workers_output = no -; log_limit = 4096 - -pm = dynamic -pm.start_servers = 2 -pm.min_spare_servers = 2 -pm.max_spare_servers = 5 -chdir = / diff --git a/8.2-kazza/manifest/usr/local/etc/php/conf.d/apc.ini b/8.2-kazza/manifest/usr/local/etc/php/conf.d/apc.ini deleted file mode 100644 index d061fd0..0000000 --- a/8.2-kazza/manifest/usr/local/etc/php/conf.d/apc.ini +++ /dev/null @@ -1,12 +0,0 @@ -[apcu] -apc.shm_size=128M -apc.enable_cli=1 -apc.rfc1867=1 -; PHP file cache 1 hour -apc.ttl=3600 -; User cache 2 hour -apc.user_ttl=7200 -; Garbage collection 1 hour -apc.gc_ttl=3600 -; check files -apc.stat=1 diff --git a/8.2-kazza/manifest/usr/local/etc/php/conf.d/opcache.ini b/8.2-kazza/manifest/usr/local/etc/php/conf.d/opcache.ini deleted file mode 100644 index 149fb43..0000000 --- a/8.2-kazza/manifest/usr/local/etc/php/conf.d/opcache.ini +++ /dev/null @@ -1,5 +0,0 @@ -[opcache] -opcache.memory_consumption=256M -opcache.max_accelerated_files=20000 -opcache_enable_file_override=1 -opcache.interned_strings_buffer=16 diff --git a/8.2-kazza/manifest/usr/local/etc/php/conf.d/php.ini b/8.2-kazza/manifest/usr/local/etc/php/conf.d/php.ini deleted file mode 100644 index f815af8..0000000 --- a/8.2-kazza/manifest/usr/local/etc/php/conf.d/php.ini +++ /dev/null @@ -1,14 +0,0 @@ -[PHP] -error_reporting = E_ALL -display_errors = Off -log_errors = On -error_log = /proc/self/fd/2 -memory_limit = -1 -max_execution_time = 60 -max_input_time = 30 -expose_php = Off -date.timezone = UTC -session_use_strict_mode = 1 -session.auto_start = Off -short_open_tag = Off -zend_detect_unicode = Off diff --git a/8.2-kazza/manifest/usr/local/etc/php/conf.d/realpath.ini b/8.2-kazza/manifest/usr/local/etc/php/conf.d/realpath.ini deleted file mode 100644 index 94607a9..0000000 --- a/8.2-kazza/manifest/usr/local/etc/php/conf.d/realpath.ini +++ /dev/null @@ -1,5 +0,0 @@ -; maximum memory allocated to store the results -realpath_cache_size=4096K - -; save the results for 10 minutes (600 seconds) -realpath_cache_ttl=600 \ No newline at end of file diff --git a/8.3-kazza/Dockerfile b/8.3-kazza/Dockerfile deleted file mode 100644 index 9e5e988..0000000 --- a/8.3-kazza/Dockerfile +++ /dev/null @@ -1,57 +0,0 @@ -ARG PHP_VERSION=8.3 -ARG CADDY_VERSION=2 - -# ----------------------------------------------------- -# Caddy Install -# ----------------------------------------------------- -FROM caddy:$CADDY_VERSION-builder AS builder -ARG TARGETPLATFORM -ARG BUILDPLATFORM -ARG TARGETOS -ARG TARGETARCH - -RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH xcaddy build - -# ----------------------------------------------------- -# App Itself -# ----------------------------------------------------- -FROM php:$PHP_VERSION-fpm-alpine - -ARG PORT=9001 -ARG PUBLIC_DIR=public - -ENV PORT=$PORT -ENV PUBLIC_DIR=$PUBLIC_DIR - -ENV REQUIRED_PACKAGES="git make zip curl libpq supervisor gettext acl fcgi python3 ca-certificates pcre rabbitmq-c icu libavif libwebp libpng freetype libjpeg-turbo libacl libheif libde265 imagemagick imagemagick-dev imagemagick-libs jpegoptim optipng pngquant gifsicle linux-headers file nodejs npm ffmpeg" -ENV EXTENSIONS="redis apcu ast maxminddb amqp zip pdo_mysql pdo_pgsql bcmath opcache gettext intl exif pcntl sysvmsg sysvsem sysvshm xsl uuid igbinary bz2 gmp mongodb imagick gd" - -ENV DOCKER=true -ENV COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_NO_INTERACTION=1 COMPOSER_CACHE_DIR="/tmp" - -WORKDIR /app - -# Copying manifest files to host -COPY ./8.3-kazza/manifest / - -# Caddy -COPY --from=builder /usr/bin/caddy /usr/local/bin/caddy - -# Composer install -COPY --from=composer/composer:2-bin /composer /usr/bin/composer - -# php extensions installer: https://github.com/mlocati/docker-php-extension-installer -ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ -RUN chmod +x /usr/local/bin/install-php-extensions - -# Install required packages -RUN apk add --update --no-cache $REQUIRED_PACKAGES - -# Install PHP extensions -RUN install-php-extensions $EXTENSIONS - -# Install sockets -RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install sockets && docker-php-ext-enable sockets - -# Update ulimit -RUN ulimit -n 16384 diff --git a/8.3-kazza/manifest/etc/caddy/Caddyfile b/8.3-kazza/manifest/etc/caddy/Caddyfile deleted file mode 100644 index e56f0d9..0000000 --- a/8.3-kazza/manifest/etc/caddy/Caddyfile +++ /dev/null @@ -1,32 +0,0 @@ -:80, :{$PORT} { - root * /app/{$PUBLIC_DIR} - - reverse_proxy /php-fpm-status 127.0.0.1:9000 { - transport fastcgi { - split .php - } - } - - php_fastcgi 127.0.0.1:9000 { - trusted_proxies private_ranges - } - - file_server - - header / { - # Enable cross-site filter (XSS) and tell browser to block detected attacks - X-XSS-Protection "1; mode=block" - # Prevent some browsers from MIME-sniffing a response away from the declared Content-Type - X-Content-Type-Options "nosniff" - # Disallow the site to be rendered within a frame (clickjacking protection) - X-Frame-Options "DENY" - } - - log { - output stdout - format console - } - - push - encode gzip -} diff --git a/8.3-kazza/manifest/etc/supervisor/conf.d/caddy.conf b/8.3-kazza/manifest/etc/supervisor/conf.d/caddy.conf deleted file mode 100644 index bd8dc6e..0000000 --- a/8.3-kazza/manifest/etc/supervisor/conf.d/caddy.conf +++ /dev/null @@ -1,7 +0,0 @@ -[program:caddy] -command=/usr/local/bin/caddy run --config /etc/caddy/Caddyfile --adapter caddyfile -autostart=true -autorestart=true -priority=10 -stdout_events_enabled=true -stderr_events_enabled=true diff --git a/8.3-kazza/manifest/etc/supervisor/conf.d/php-fpm.conf b/8.3-kazza/manifest/etc/supervisor/conf.d/php-fpm.conf deleted file mode 100644 index 07542e1..0000000 --- a/8.3-kazza/manifest/etc/supervisor/conf.d/php-fpm.conf +++ /dev/null @@ -1,13 +0,0 @@ -[program:php-fpm] -command=/usr/local/sbin/php-fpm -c /usr/local/etc -process_name=%(program_name)s_%(process_num)02d -priority=5 -numprocs=1 -autostart=true -autorestart=false -startsecs=0 -redirect_stderr=true -stdout_logfile=/dev/stdout -stderr_logfile=/dev/stderr -stdout_logfile_maxbytes=0 -stderr_logfile_maxbytes=0 diff --git a/8.3-kazza/manifest/etc/supervisord.conf b/8.3-kazza/manifest/etc/supervisord.conf deleted file mode 100644 index 68dc04e..0000000 --- a/8.3-kazza/manifest/etc/supervisord.conf +++ /dev/null @@ -1,28 +0,0 @@ -[unix_http_server] -file=/var/run/supervisor.sock ; (the path to the socket file) - -[supervisord] -loglevel=info ; (log level;default info; others: debug,warn,trace) -pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) -nodaemon=false ; (start in foreground if true;default false) -minfds=1024 ; (min. avail startup file descriptors;default 1024) -minprocs=200 ; (min. avail process descriptors;default 200) -user=root ; - -; the below section must remain in the config file for RPC -; (supervisorctl/web interface) to work, additional interfaces may be -; added by defining them in separate rpcinterface: sections -[rpcinterface:supervisor] -supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface - -[supervisorctl] -serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket - -; [eventlistener:stdout] -; command = supervisor_stdout -; buffer_size = 100 -; events = PROCESS_LOG -; result_handler = supervisor_stdout:event_handler - -[include] -files = /etc/supervisor/conf.d/*.conf diff --git a/8.3-kazza/manifest/usr/local/etc/php-fpm.d/docker.conf b/8.3-kazza/manifest/usr/local/etc/php-fpm.d/docker.conf deleted file mode 100644 index 244bc64..0000000 --- a/8.3-kazza/manifest/usr/local/etc/php-fpm.d/docker.conf +++ /dev/null @@ -1,21 +0,0 @@ -[global] -error_log=/proc/self/fd/2 - -[www] -; access.log=/proc/self/fd/2 -access.log=/dev/null - -clear_env = no - -; Ensure worker stdout and stderr are sent to the main error log. -catch_workers_output = yes -decorate_workers_output = no -; log_limit = 4096 - -pm = dynamic -pm.start_servers = 2 -pm.min_spare_servers = 2 -pm.max_spare_servers = 5 -chdir = / - -pm.status_path = /php-fpm-status diff --git a/8.3-kazza/manifest/usr/local/etc/php/conf.d/apc.ini b/8.3-kazza/manifest/usr/local/etc/php/conf.d/apc.ini deleted file mode 100644 index d061fd0..0000000 --- a/8.3-kazza/manifest/usr/local/etc/php/conf.d/apc.ini +++ /dev/null @@ -1,12 +0,0 @@ -[apcu] -apc.shm_size=128M -apc.enable_cli=1 -apc.rfc1867=1 -; PHP file cache 1 hour -apc.ttl=3600 -; User cache 2 hour -apc.user_ttl=7200 -; Garbage collection 1 hour -apc.gc_ttl=3600 -; check files -apc.stat=1 diff --git a/8.3-kazza/manifest/usr/local/etc/php/conf.d/opcache.ini b/8.3-kazza/manifest/usr/local/etc/php/conf.d/opcache.ini deleted file mode 100644 index 149fb43..0000000 --- a/8.3-kazza/manifest/usr/local/etc/php/conf.d/opcache.ini +++ /dev/null @@ -1,5 +0,0 @@ -[opcache] -opcache.memory_consumption=256M -opcache.max_accelerated_files=20000 -opcache_enable_file_override=1 -opcache.interned_strings_buffer=16 diff --git a/8.3-kazza/manifest/usr/local/etc/php/conf.d/php.ini b/8.3-kazza/manifest/usr/local/etc/php/conf.d/php.ini deleted file mode 100644 index f815af8..0000000 --- a/8.3-kazza/manifest/usr/local/etc/php/conf.d/php.ini +++ /dev/null @@ -1,14 +0,0 @@ -[PHP] -error_reporting = E_ALL -display_errors = Off -log_errors = On -error_log = /proc/self/fd/2 -memory_limit = -1 -max_execution_time = 60 -max_input_time = 30 -expose_php = Off -date.timezone = UTC -session_use_strict_mode = 1 -session.auto_start = Off -short_open_tag = Off -zend_detect_unicode = Off diff --git a/8.3-kazza/manifest/usr/local/etc/php/conf.d/realpath.ini b/8.3-kazza/manifest/usr/local/etc/php/conf.d/realpath.ini deleted file mode 100644 index 94607a9..0000000 --- a/8.3-kazza/manifest/usr/local/etc/php/conf.d/realpath.ini +++ /dev/null @@ -1,5 +0,0 @@ -; maximum memory allocated to store the results -realpath_cache_size=4096K - -; save the results for 10 minutes (600 seconds) -realpath_cache_ttl=600 \ No newline at end of file diff --git a/README.md b/README.md index bedaf80..b686edc 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ # Alpine-Caddy-FPM -A specialized box containing: - -* Alpine: 3.9 -* PHP: 7.(2|3|4)-rc-fpm-alpine -* Caddy: v1.0.0 +Docker images for PHP with Symfony