2 Commits

Author SHA1 Message Date
0b2b46314d - Add PHP_MEMORY_LIMIT & PHP_UPLOAD_LIMIT environment variable,
- Use now rx3-docker/server:1.2.1-mga9 image.
2025-03-08 12:31:27 +01:00
c3f77114c3 - Add Apache enabling via APACHE_HTTPD_ENABLE environement variable. 2024-12-31 20:02:25 +01:00
5 changed files with 64 additions and 21 deletions

View File

@@ -27,15 +27,34 @@ ARG HTTPD='#!/bin/bash
usermod -u ${APACHE_UID} apache \n\ usermod -u ${APACHE_UID} apache \n\
groupmod -g ${APACHE_GID} apache \n\ groupmod -g ${APACHE_GID} apache \n\
\n\ \n\
chown -R apache:apache /var/log/httpd \n\
\n\
for file in /etc/httpd/conf/httpd.conf /etc/httpd/conf/conf.d/rx3.conf \n\
do \n\
sed -i -e "s%/var/www/html%${APACHE_DOC_ROOT}%" ${file} \n\
done \n\
\n\
chgrp apache /usr/bin/pwauth \n\ chgrp apache /usr/bin/pwauth \n\
chmod u+s /usr/bin/pwauth' chmod u+s /usr/bin/pwauth \n\
\n\
if [[ "${APACHE_HTTPD_ENABLED}" == "FALSE" ]] \n\
then \n\
mv /etc/supervisord.d/httpd.ini /etc/supervisord.d/httpd.ini.disabled \n\
else \n\
chown -R apache:apache /var/log/httpd \n\
\n\
for file in /etc/httpd/conf/httpd.conf /etc/httpd/conf/conf.d/rx3.conf \n\
do \n\
sed -i -e "s%/var/www/html%${APACHE_DOC_ROOT}%" ${file} \n\
done \n\
\n\
if [[ "${PHP_MEMORY_LIMIT}" == "" ]] \n\
then \n\
PHP_MEMORY_LIMIT="512M" \n\
fi \n\
\n\
if [[ "${PHP_UPLOAD_LIMIT}" == "" ]] \n\
then \n\
PHP_UPLOAD_LIMIT="32M" \n\
fi \n\
\n\
sed -i -e "s/memory_limit = 128M/memory_limit = ${PHP_MEMORY_LIMIT}/" /etc/php.d/01_ressourcelimits.ini \n\
sed -i -e "s/upload_max_filesize = 16M/upload_max_filesize = ${PHP_UPLOAD_LIMIT}/" /etc/php.d/01_fileuploads.ini \n\
sed -i -e "s/post_max_size = 8M/post_max_size = ${PHP_UPLOAD_LIMIT}/" /etc/php.d/01_datahandling.ini \n\
fi'
#--------------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------- #---------------------------------------------------------------------------------------------------
@@ -67,10 +86,7 @@ RUN urpmi --force apache apache-mod_proxy apache-mod_proxy_html apache-mod_ph
&& ln -s /etc/init.d/httpd /etc/rcD.d/S30httpd \ && ln -s /etc/init.d/httpd /etc/rcD.d/S30httpd \
&& echo -e "${HTTPD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/httpd.ini \ && echo -e "${HTTPD_INI}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/supervisord.d/httpd.ini \
&& echo -e "${HTTPD_CONF}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/httpd/conf/conf.d/rx3.conf \ && echo -e "${HTTPD_CONF}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/httpd/conf/conf.d/rx3.conf \
&& echo -e "${INFO_PHP}" | sed -e "s/\`/'/g" -e 's/ *$//' > /var/www/html/info.php \ && echo -e "${INFO_PHP}" | sed -e "s/\`/'/g" -e 's/ *$//' > /var/www/html/info.php
&& sed -i -e "s/memory_limit = 128M/memory_limit = 512M/" /etc/php.d/01_ressourcelimits.ini \
&& sed -i -e "s/upload_max_filesize = 16M/upload_max_filesize = 32M/" /etc/php.d/01_fileuploads.ini \
&& sed -i -e "s/post_max_size = 8M/post_max_size = 32M/" /etc/php.d/01_datahandling.ini
VOLUME ${APACHE_DOC_ROOT} VOLUME ${APACHE_DOC_ROOT}

View File

@@ -5,12 +5,15 @@ Welcome to Rx3-Docker/PHP-Apache docker image!
This project aims to build a PHP + Apache docker image used by other Rx3 packaging projects. This project aims to build a PHP + Apache docker image used by other Rx3 packaging projects.
Features: Features:
- Curtently based on rx3-docker/server:1.2.0-mga9 image, - Curtently based on rx3-docker/server:1.2.1-mga9 image,
- PostgreSQL & MySQL ready, - PostgreSQL & MySQL ready,
- PHPMailer installed, - PHPMailer installed,
- logrotate configured, - logrotate configured,
- Apache UID, GID & document root directory configurable, - Apache UID, GID & document root directory configurable,
- mod_proxy + mod_proxy_html installed. - mod_proxy + mod_proxy_html installed,
- HTTPD service enabled by default,
- PHP_MEMORY_LIMIT variable set to 512M by default,
- PHP_UPLOAD_LIMIT variable set to 32M by defaylt.
Enjoy it! Enjoy it!

View File

@@ -1,3 +1,20 @@
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/PHP-Apache V 1.5.2 - A. GIBERT - 2025/03/08
------------------------------------------------------------------------------------------------------------------------------------
- Add PHP_MEMORY_LIMIT & PHP_UPLOAD_LIMIT environment variable,
- Use now rx3-docker/server:1.2.1-mga9 image.
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/PHP-Apache V 1.5.1 - A. GIBERT - 2024/12/31
------------------------------------------------------------------------------------------------------------------------------------
- Add Apache enabling via APACHE_HTTPD_ENABLE environment variable.
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/PHP-Apache V 1.5.0 - A. GIBERT - 2024/12/21 Rx3-Docker/PHP-Apache V 1.5.0 - A. GIBERT - 2024/12/21
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -31,6 +31,9 @@ services:
APACHE_UID: ${WA_USER_ID} APACHE_UID: ${WA_USER_ID}
APACHE_GID: ${WA_GROUP_ID} APACHE_GID: ${WA_GROUP_ID}
APACHE_DOC_ROOT: ${WA_DOC_ROOT} APACHE_DOC_ROOT: ${WA_DOC_ROOT}
APACHE_HTTPD_ENABLED: ${WA_APACHE_HTTPD_ENABLED}
PHP_MEMORY_LIMIT: ${WA_PHP_MEMORY_LIMIT}
PHP_UPLOAD_LIMIT: ${WA_PHP_UPLOAD_LIMIT}
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${WA_PORT_MAIN_INT}"] test: ["CMD", "curl", "-f", "http://localhost:${WA_PORT_MAIN_INT}"]

View File

@@ -26,6 +26,7 @@ PORT_SV_OFFSET=1000
DOCKER_TOOLS_DEBUG=FALSE DOCKER_TOOLS_DEBUG=FALSE
DOCKER_TOOLS_VOLUME=SINGLE DOCKER_TOOLS_VOLUME=SINGLE
#DOCKER_TOOLS_VOLUME=MIXED
#DOCKER_TOOLS_VOLUME=MERGED #DOCKER_TOOLS_VOLUME=MERGED
#DOCKER_TOOLS_VOLUME=SPLITED #DOCKER_TOOLS_VOLUME=SPLITED
DOCKER_TOOLS_EXEPTION_LIBS="httpd:/var/www/html" DOCKER_TOOLS_EXEPTION_LIBS="httpd:/var/www/html"
@@ -37,7 +38,7 @@ DOCKER_TOOLS_EXEPTION_LIBS="httpd:/var/www/html"
# | Prefix | Name | URL Prefix | Name | Name Full | Version | URL Prefix | Name | Version | Name | Version | Ext | Int | Ext | Int | Name / Id | Name / Id | # | Prefix | Name | URL Prefix | Name | Name Full | Version | URL Prefix | Name | Version | Name | Version | Ext | Int | Ext | Int | Name / Id | Name / Id |
#------------------+----------+--------------------------+--------------------+------------------+-------------------------------+-----------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+ #------------------+----------+--------------------------+--------------------+------------------+-------------------------------+-----------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+
docker_service_add WA webapp ${ORG_URL_PREFIX} php-apache "Rx3-Docker/PHP-Apache" 1.5.0-mga9 ${ORG_URL_PREFIX} server 1.2.0-mga9 httpd - 8080 80 - - apache apache docker_service_add WA webapp ${ORG_URL_PREFIX} php-apache "Rx3-Docker/PHP-Apache" 1.5.2-mga9 ${ORG_URL_PREFIX} server 1.2.1-mga9 httpd - 8080 80 - - apache apache
@@ -48,3 +49,6 @@ docker_service_add WA webapp ${ORG_URL_PREFIX}
SERVER_CROND_ENABLED="FALSE" SERVER_CROND_ENABLED="FALSE"
WA_DOC_ROOT="/var/www/html" WA_DOC_ROOT="/var/www/html"
WA_APACHE_HTTPD_ENABLED="TRUE"
WA_PHP_MEMORY_LIMIT="512M"
WA_PHP_UPLOAD_LIMIT="32M"