- Add PHP_MEMORY_LIMIT & PHP_UPLOAD_LIMIT environment variable,
- Use now rx3-docker/server:1.2.1-mga9 image.
This commit is contained in:
parent
c3f77114c3
commit
0b2b46314d
55
Dockerfile
55
Dockerfile
@ -22,24 +22,38 @@ ARG APACHE_PORT
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
ARG HTTPD='#!/bin/bash \n\
|
||||
\n\
|
||||
usermod -u ${APACHE_UID} apache \n\
|
||||
groupmod -g ${APACHE_GID} apache \n\
|
||||
\n\
|
||||
chgrp apache /usr/bin/pwauth \n\
|
||||
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\
|
||||
ARG HTTPD='#!/bin/bash \n\
|
||||
\n\
|
||||
usermod -u ${APACHE_UID} apache \n\
|
||||
groupmod -g ${APACHE_GID} apache \n\
|
||||
\n\
|
||||
chgrp apache /usr/bin/pwauth \n\
|
||||
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'
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -72,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 \
|
||||
&& 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 "${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
|
||||
&& echo -e "${INFO_PHP}" | sed -e "s/\`/'/g" -e 's/ *$//' > /var/www/html/info.php
|
||||
|
||||
|
||||
VOLUME ${APACHE_DOC_ROOT}
|
||||
|
@ -5,13 +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.
|
||||
|
||||
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,
|
||||
- PHPMailer installed,
|
||||
- logrotate configured,
|
||||
- Apache UID, GID & document root directory configurable,
|
||||
- mod_proxy + mod_proxy_html installed,
|
||||
- HTTPD service enabled by default.
|
||||
- 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!
|
||||
|
@ -1,8 +1,17 @@
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
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 environement variable.
|
||||
- Add Apache enabling via APACHE_HTTPD_ENABLE environment variable.
|
||||
|
||||
|
||||
|
||||
|
@ -32,6 +32,8 @@ services:
|
||||
APACHE_GID: ${WA_GROUP_ID}
|
||||
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:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:${WA_PORT_MAIN_INT}"]
|
||||
|
5
env.dist
5
env.dist
@ -26,6 +26,7 @@ PORT_SV_OFFSET=1000
|
||||
|
||||
DOCKER_TOOLS_DEBUG=FALSE
|
||||
DOCKER_TOOLS_VOLUME=SINGLE
|
||||
#DOCKER_TOOLS_VOLUME=MIXED
|
||||
#DOCKER_TOOLS_VOLUME=MERGED
|
||||
#DOCKER_TOOLS_VOLUME=SPLITED
|
||||
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 |
|
||||
#------------------+----------+--------------------------+--------------------+------------------+-------------------------------+-----------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
@ -49,3 +50,5 @@ SERVER_CROND_ENABLED="FALSE"
|
||||
|
||||
WA_DOC_ROOT="/var/www/html"
|
||||
WA_APACHE_HTTPD_ENABLED="TRUE"
|
||||
WA_PHP_MEMORY_LIMIT="512M"
|
||||
WA_PHP_UPLOAD_LIMIT="32M"
|
||||
|
Loading…
Reference in New Issue
Block a user