Compare commits
4 Commits
php-apache
...
master
Author | SHA1 | Date | |
---|---|---|---|
2de510e467 | |||
4797d18971 | |||
62cd36b12b | |||
08ec413f3a |
72
Dockerfile
72
Dockerfile
@ -1,22 +1,48 @@
|
||||
# Rx3 PHP Apache Mageia-9 Docker Image
|
||||
# Rx3-Docker/PHP-Apache Docker Image
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
ARG IMG_URL_PREFIX="rx3"
|
||||
ARG IMG_FROM_URL="rx3-docker/server:latest"
|
||||
|
||||
FROM ${IMG_URL_PREFIX}/server-mga9:1.1.1
|
||||
FROM ${IMG_FROM_URL}
|
||||
|
||||
ARG IMG_NAME
|
||||
ARG IMG_FULL_NAME
|
||||
ARG IMG_NAME_FULL
|
||||
ARG IMG_VERSION
|
||||
ARG IMG_MAINTAINER
|
||||
|
||||
LABEL org.rx3.${IMG_NAME}.name=${IMG_FULL_NAME}
|
||||
LABEL org.rx3.${IMG_NAME}.name=${IMG_NAME_FULL}
|
||||
LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION}
|
||||
LABEL org.rx3.${IMG_NAME}.maintainer=${IMG_MAINTAINER}
|
||||
LABEL maintainer=${IMG_MAINTAINER}
|
||||
|
||||
ARG APACHE_DOC_ROOT
|
||||
ARG APACHE_LOG_DIR
|
||||
ARG APACHE_PORT
|
||||
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
ARG HTTPD='#!/bin/bash \n\
|
||||
\n\
|
||||
usermod -u ${APACHE_UID} apache \n\
|
||||
groupmod -g ${APACHE_GID} apache \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\
|
||||
chmod u+s /usr/bin/pwauth'
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
ARG HTTPD_INI='[program:httpd] \n\
|
||||
command=/usr/sbin/httpd -DFOREGROUND'
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
ARG HTTPD_CONF='RewriteEngine On \n\
|
||||
<Directory /var/www/html> \n\
|
||||
@ -29,37 +55,25 @@ ARG HTTPD_CONF='RewriteEngine On
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
ARG INFO_PHP='<?php \n\
|
||||
phpinfo(); \n\
|
||||
phpinfo(INFO_MODULES); \n\
|
||||
phpinfo( INFO_MODULES); \n\
|
||||
?>'
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
ARG HTTPD='#!/bin/bash \n\
|
||||
\n\
|
||||
usermod -u ${APACHE_UID} apache \n\
|
||||
groupmod -g ${APACHE_GID} apache \n\
|
||||
\n\
|
||||
chown -R apache:apache /var/log/httpd \n\
|
||||
\n\
|
||||
sed -i -e "s%/var/www/html%${APACHE_DOC_ROOT}%" /etc/httpd/conf/httpd.conf'
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
ARG HTTPD_INI='[program:httpd] \n\
|
||||
command=/usr/sbin/httpd -DFOREGROUND'
|
||||
#---------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
RUN urpmi --force apache apache-mod_php php-cli php-pgsql php-mysqli php-pdo_pgsql php-pdo_mysql php-phpmailer \
|
||||
&& echo -e "${HTTPD_CONF}" | sed -e 's/ *$//' > /etc/httpd/conf/conf.d/rx3.conf \
|
||||
&& echo -e "${INFO_PHP}" | sed -e 's/ *$//' > /var/www/html/info.php \
|
||||
&& echo -e "${HTTPD}" | sed -e 's/ *$//' > /etc/init.d/httpd \
|
||||
RUN urpmi --force apache apache-mod_php php-cli php-pgsql php-mysqli php-pdo_pgsql php-pdo_mysql php-phpmailer pwauth \
|
||||
&& echo -e "${HTTPD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/httpd \
|
||||
&& chmod a+x /etc/init.d/httpd \
|
||||
&& ln -s /etc/init.d/httpd /etc/rcD.d/S30httpd \
|
||||
&& echo -e "${HTTPD_INI}" | sed -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 "${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 /var/www/html
|
||||
VOLUME ${APACHE_DOC_ROOT}
|
||||
VOLUME ${APACHE_LOG_DIR}
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE ${APACHE_PORT}
|
||||
|
@ -1,11 +1,11 @@
|
||||
Welcome to Rx3/PHP-Apache-Mga9 docker image!
|
||||
Welcome to Rx3-Docker/PHP-Apache docker image!
|
||||
|
||||
|
||||
|
||||
This is project aims to build a PHP + Apache + Mageia 9 docker image used by others Rx3 packaging projects.
|
||||
This project aims to build a PHP + Apache docker image used by others Rx3 packaging projects.
|
||||
|
||||
Features:
|
||||
- Curtently based on rx3/server-mga9:1.1.1 image,
|
||||
- Curtently based on rx3-docker/server:1.2.0-mga9 image,
|
||||
- PostgreSQL & MySQL ready,
|
||||
- PHPMailer installed,
|
||||
- logrotate configured,
|
||||
@ -18,4 +18,4 @@ Your Rx3 Team.
|
||||
|
||||
--
|
||||
arnaud@rx3.net
|
||||
https://git.rx3.org/gitea/rx3/php-apache-mga9
|
||||
https://git.rx3.org/gitea/rx3-docker/php-apache
|
||||
|
@ -1,3 +1,40 @@
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
Rx3-Docker/PHP-Apache V 1.4.0 - A. GIBERT - 2024/11/11
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
- Move & Rename repo from Rx3/PHP-Apache-MGA9 to Rx3-Docker/PHP-Apache,
|
||||
- New version naming standard,
|
||||
- Now use docker_tools for .env building,
|
||||
- Use now rx3-docker/server:1.2.0-mga9 image,
|
||||
- Add /var/log/init, /var/log/supervisor & var/log/httpd volumes.
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
Rx3/PHP-Apache-Mga9 V 1.3.3 - A. GIBERT - 2024/10/05
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
- Now use rx3/server-mga9:1.1.3 image,
|
||||
- Add pwauth auth program,
|
||||
- Increase php params:
|
||||
- memory_limit from 128M to 512M,
|
||||
- upload_max_filesize from 16M to 32M,
|
||||
- post_max_size from 8M to 32M,
|
||||
- Don't expose unneeded /var/www/html in compose file,
|
||||
- Variabilization of external server ports in env & compose file,
|
||||
- Use now docker_tools for .env building.
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
Rx3/PHP-Apache-Mga9 V 1.3.2 - A. GIBERT - 2024/08/28
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
- Now use rx3/server-mga9:1.1.2 image,
|
||||
- Fix Apache root document not updated in /etc/httpd/conf/conf.d/rx3.conf.
|
||||
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
Rx3/PHP-Apache-Mga9 V 1.3.1 - A. GIBERT - 2024/08/27
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
35
compose.yaml
35
compose.yaml
@ -1,4 +1,4 @@
|
||||
# Rx3 PHP Apache Mageia-9 Docker Image
|
||||
# Rx3-Docker/PHP-Apache Docker Image
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
name: ${IMG_NAME}
|
||||
@ -7,27 +7,42 @@ services:
|
||||
|
||||
webapp:
|
||||
container_name: ${IMG_NAME}
|
||||
hostname: ${IMG_NAME}
|
||||
|
||||
image: ${IMG_URL}
|
||||
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
- IMG_NAME=${IMG_NAME}
|
||||
- IMG_FULL_NAME=${IMG_FULL_NAME}
|
||||
- IMG_VERSION=${IMG_VERSION}
|
||||
- IMG_MAINTAINER=${IMG_MAINTAINER}
|
||||
- IMG_URL_PREFIX=${IMG_URL_PREFIX}
|
||||
IMG_NAME: ${IMG_NAME}
|
||||
IMG_NAME_FULL: ${IMG_NAME_FULL}
|
||||
IMG_VERSION: ${IMG_VERSION}
|
||||
IMG_MAINTAINER: ${IMG_MAINTAINER}
|
||||
IMG_FROM_URL: ${IMG_FROM_URL}
|
||||
|
||||
APACHE_DOC_ROOT: ${WEBAPP_DOC_ROOT}
|
||||
APACHE_LOG_DIR: ${WEBAPP_LOG_HTTPD_DIR}
|
||||
APACHE_PORT: ${WEBAPP_PORT_MAIN_INT}
|
||||
|
||||
restart: unless-stopped
|
||||
|
||||
environment:
|
||||
APACHE_UID: ${APACHE_UID}
|
||||
APACHE_GID: ${APACHE_GID}
|
||||
APACHE_DOC_ROOT: ${APACHE_DOC_ROOT}
|
||||
APACHE_DOC_ROOT: ${WEBAPP_DOC_ROOT}
|
||||
|
||||
network_mode: bridge
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:${WEBAPP_PORT_MAIN_INT}"]
|
||||
interval: 10s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
|
||||
volumes:
|
||||
# - ./var/www/html:${WEBAPP_DOC_ROOT}
|
||||
- ./var/log/init:${WEBAPP_LOG_INIT_DIR}
|
||||
- ./var/log/supervisor:${WEBAPP_LOG_SV_DIR}
|
||||
- ./var/log/httpd:${WEBAPP_LOG_HTTPD_DIR}
|
||||
|
||||
ports:
|
||||
- "127.0.0.1:9011:9001"
|
||||
- "127.0.0.1:8080:80"
|
||||
- "127.0.0.1:${WEBAPP_PORT_SV_EXT}:${WEBAPP_PORT_SV_INT}"
|
||||
- "127.0.0.1:${WEBAPP_PORT_MAIN_EXT}:${WEBAPP_PORT_MAIN_INT}"
|
||||
|
@ -1,13 +1,14 @@
|
||||
# Rx3 PHP Apache Mageia-9 Docker Image
|
||||
# Rx3-Docker/PHP-Apache Docker Image
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Global Settings
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
IMG_ORG="rx3"
|
||||
IMG_REGISTRY="docker.xor.rx3:5000"
|
||||
IMG_URL_PREFIX="${IMG_REGISTRY}/${IMG_ORG}"
|
||||
ORG_NAME="rx3-docker"
|
||||
ORG_REGISTRY="docker.xor.rx3:5000"
|
||||
|
||||
ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}"
|
||||
|
||||
|
||||
|
||||
@ -15,18 +16,36 @@ IMG_URL_PREFIX="${IMG_REGISTRY}/${IMG_ORG}"
|
||||
# Image Settings
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
IMG_NAME="php-apache-mga9"
|
||||
IMG_FULL_NAME="Rx3 PHP Apache Mageia-9 Docker Image"
|
||||
IMG_VERSION="1.3.1"
|
||||
IMG_URL="${IMG_URL_PREFIX}/${IMG_NAME}:${IMG_VERSION}"
|
||||
IMG_NAME="php-apache"
|
||||
IMG_NAME_FULL="Rx3-Docker/PHP-Apache Docker Image"
|
||||
IMG_VERSION="1.4.0-mga9"
|
||||
IMG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
|
||||
|
||||
IMG_URL_PREFIX="${ORG_URL_PREFIX}"
|
||||
IMG_URL="${IMG_URL_PREFIX}/${IMG_NAME}:${IMG_VERSION}"
|
||||
|
||||
IMG_FROM_URL="${ORG_URL_PREFIX}/server:1.2.0-mga9"
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# User Settings
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
ENV_PORT_OFFSET=0
|
||||
SV_PORT_OFFSET=1000
|
||||
|
||||
WEBAPP_PORT_MAIN_EXT=$(( 8080 + ${ENV_PORT_OFFSET}))
|
||||
WEBAPP_PORT_MAIN_INT=80
|
||||
|
||||
WEBAPP_PORT_SV_EXT=$(( ${WEBAPP_PORT_MAIN_EXT} + ${SV_PORT_OFFSET}))
|
||||
WEBAPP_PORT_SV_INT=9001
|
||||
|
||||
WEBAPP_LOG_INIT_DIR="/var/log/init"
|
||||
WEBAPP_LOG_SV_DIR="/var/log/supervisor"
|
||||
WEBAPP_LOG_HTTPD_DIR="/var/log/httpd"
|
||||
|
||||
WEBAPP_DOC_ROOT="/var/www/html"
|
||||
|
||||
APACHE_UID=980
|
||||
APACHE_GID=977
|
||||
APACHE_DOC_ROOT=/var/www/html
|
4
var/log/httpd/.gitignore
vendored
Normal file
4
var/log/httpd/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
4
var/log/init/.gitignore
vendored
Normal file
4
var/log/init/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
4
var/log/supervisor/.gitignore
vendored
Normal file
4
var/log/supervisor/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
Loading…
Reference in New Issue
Block a user