- Add apache mod proxy to support reverse proxy configuration.
This commit is contained in:
parent
2de510e467
commit
56e78a5132
@ -61,7 +61,7 @@ ARG INFO_PHP='<?php
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
RUN urpmi --force apache apache-mod_php php-cli php-pgsql php-mysqli php-pdo_pgsql php-pdo_mysql php-phpmailer pwauth \
|
RUN urpmi --force apache apache-mod_proxy apache-mod_proxy_html 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 \
|
&& echo -e "${HTTPD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/httpd \
|
||||||
&& chmod a+x /etc/init.d/httpd \
|
&& chmod a+x /etc/init.d/httpd \
|
||||||
&& ln -s /etc/init.d/httpd /etc/rcD.d/S30httpd \
|
&& ln -s /etc/init.d/httpd /etc/rcD.d/S30httpd \
|
||||||
|
@ -2,14 +2,15 @@ Welcome to Rx3-Docker/PHP-Apache docker image!
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
This project aims to build a PHP + Apache docker image used by others 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.0-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.
|
||||||
|
|
||||||
|
|
||||||
Enjoy it!
|
Enjoy it!
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
Rx3-Docker/PHP-Apache V 1.5.0 - A. GIBERT - 2024/12/21
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- Add apache mod proxy to support reverse proxy configuration.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
Rx3-Docker/PHP-Apache V 1.4.0 - A. GIBERT - 2024/11/11
|
Rx3-Docker/PHP-Apache V 1.4.0 - A. GIBERT - 2024/11/11
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
57
compose.yaml
57
compose.yaml
@ -1,48 +1,49 @@
|
|||||||
# Rx3-Docker/PHP-Apache Docker Image
|
# Rx3-Docker/PHP-Apache Docker Image
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
name: ${IMG_NAME}
|
name: ${HOST_NAME_PREFIX}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
webapp:
|
#-------------------------------------------------------------------------------
|
||||||
container_name: ${IMG_NAME}
|
|
||||||
hostname: ${IMG_NAME}
|
|
||||||
|
|
||||||
image: ${IMG_URL}
|
webapp:
|
||||||
|
container_name: ${WA_HOST_NAME}
|
||||||
|
hostname: ${WA_HOST_NAME}
|
||||||
|
|
||||||
|
image: ${WA_IMG_URL}
|
||||||
|
|
||||||
build:
|
build:
|
||||||
context: .
|
|
||||||
args:
|
args:
|
||||||
IMG_NAME: ${IMG_NAME}
|
IMG_NAME: ${WA_IMG_URL}
|
||||||
IMG_NAME_FULL: ${IMG_NAME_FULL}
|
IMG_NAME_FULL: ${WA_IMG_NAME_FULL}
|
||||||
IMG_VERSION: ${IMG_VERSION}
|
IMG_VERSION: ${WA_IMG_VERSION}
|
||||||
IMG_MAINTAINER: ${IMG_MAINTAINER}
|
IMG_MAINTAINER: ${WA_IMG_MAINTAINER}
|
||||||
IMG_FROM_URL: ${IMG_FROM_URL}
|
IMG_FROM_URL: ${WA_IMG_FROM_URL}
|
||||||
|
|
||||||
APACHE_DOC_ROOT: ${WEBAPP_DOC_ROOT}
|
APACHE_DOC_ROOT: ${WA_DOC_ROOT}
|
||||||
APACHE_LOG_DIR: ${WEBAPP_LOG_HTTPD_DIR}
|
APACHE_LOG_DIR: ${WA_LOG_MAIN_INT}
|
||||||
APACHE_PORT: ${WEBAPP_PORT_MAIN_INT}
|
APACHE_PORT: ${WA_PORT_MAIN_INT}
|
||||||
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
APACHE_UID: ${APACHE_UID}
|
APACHE_UID: ${WA_USER_ID}
|
||||||
APACHE_GID: ${APACHE_GID}
|
APACHE_GID: ${WA_GROUP_ID}
|
||||||
APACHE_DOC_ROOT: ${WEBAPP_DOC_ROOT}
|
APACHE_DOC_ROOT: ${WA_DOC_ROOT}
|
||||||
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:${WEBAPP_PORT_MAIN_INT}"]
|
test: ["CMD", "curl", "-f", "http://localhost:${WA_PORT_MAIN_INT}"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
# - ./var/www/html:${WEBAPP_DOC_ROOT}
|
- ./${WA_LIB_EXT}:${WA_LIB_INT}
|
||||||
- ./var/log/init:${WEBAPP_LOG_INIT_DIR}
|
- ./${WA_LOG_INIT_EXT}:${WA_LOG_INIT_INT}
|
||||||
- ./var/log/supervisor:${WEBAPP_LOG_SV_DIR}
|
- ./${WA_LOG_SV_EXT}:${WA_LOG_SV_INT}
|
||||||
- ./var/log/httpd:${WEBAPP_LOG_HTTPD_DIR}
|
- ./${WA_LOG_MAIN_EXT}:${WA_LOG_MAIN_INT}
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:${WEBAPP_PORT_SV_EXT}:${WEBAPP_PORT_SV_INT}"
|
- "127.0.0.1:${WA_PORT_SV_EXT}:${WA_PORT_SV_INT}"
|
||||||
- "127.0.0.1:${WEBAPP_PORT_MAIN_EXT}:${WEBAPP_PORT_MAIN_INT}"
|
- "127.0.0.1:${WA_PORT_MAIN_EXT}:${WA_PORT_MAIN_INT}"
|
||||||
|
45
env.dist
45
env.dist
@ -5,8 +5,10 @@
|
|||||||
# Global Settings
|
# Global Settings
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
ORG_NAME="rx3-docker"
|
ORG_NAME="rx3-docker"
|
||||||
ORG_REGISTRY="docker.xor.rx3:5000"
|
ORG_REGISTRY="docker.xor.rx3:5000"
|
||||||
|
ORG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
|
||||||
|
|
||||||
ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}"
|
ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}"
|
||||||
|
|
||||||
@ -15,16 +17,27 @@ ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}"
|
|||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Image Settings
|
# Image Settings
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
HOST_NAME_PREFIX=""
|
||||||
|
|
||||||
IMG_NAME="php-apache"
|
PORT_ENV_OFFSET=0
|
||||||
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}"
|
PORT_SV_INT=9001
|
||||||
IMG_URL="${IMG_URL_PREFIX}/${IMG_NAME}:${IMG_VERSION}"
|
PORT_SV_OFFSET=1000
|
||||||
|
|
||||||
IMG_FROM_URL="${ORG_URL_PREFIX}/server:1.2.0-mga9"
|
DOCKER_TOOLS_DEBUG=FALSE
|
||||||
|
DOCKER_TOOLS_VOLUME=SINGLE
|
||||||
|
#DOCKER_TOOLS_VOLUME=MERGED
|
||||||
|
#DOCKER_TOOLS_VOLUME=SPLITED
|
||||||
|
DOCKER_TOOLS_EXEPTION_LIBS="httpd:/var/www/html"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#------------------+----------+--------------------------+--------------------+------------------+-------------------------------+-----------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+
|
||||||
|
# | Variable | Service | Target Image | From Image | Module | Main Port | Admin Port | User | Group |
|
||||||
|
# | 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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -32,20 +45,6 @@ IMG_FROM_URL="${ORG_URL_PREFIX}/server:1.2.0-mga9"
|
|||||||
# User Settings
|
# User Settings
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
ENV_PORT_OFFSET=0
|
SERVER_CROND_ENABLED="FALSE"
|
||||||
SV_PORT_OFFSET=1000
|
|
||||||
|
|
||||||
WEBAPP_PORT_MAIN_EXT=$(( 8080 + ${ENV_PORT_OFFSET}))
|
WA_DOC_ROOT="/var/www/html"
|
||||||
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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user