- Initial release,

- Use based on php-apache:1.4.0-mga9 & postgresql:1.1.0-mga9 images.
This commit is contained in:
Arnaud G. GIBERT 2025-03-06 16:23:57 +01:00
commit c696384f54
6 changed files with 285 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*~
*.old

39
Dockerfile Normal file
View File

@ -0,0 +1,39 @@
# Rx3-Docker/MantisBT Dockerfile
#-------------------------------------------------------------------------------
ARG IMG_FROM_URL="rx3-docker/php-apache:latest"
FROM ${IMG_FROM_URL}
ARG IMG_NAME
ARG IMG_NAME_FULL
ARG IMG_VERSION
ARG IMG_MAINTAINER
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 MANTISBT_VERSION=2.27.1
#---------------------------------------------------------------------------------------------------
ARG MANTISBT='#!/bin/bash \n\
\n\
chown -R apache:apache /var/www/html'
#---------------------------------------------------------------------------------------------------
RUN urpmi.update -a \
&& urpmi --force wget \
&& wget -q -O - https://sourceforge.net/projects/mantisbt/files/mantis-stable/${MANTISBT_VERSION}/mantisbt-${MANTISBT_VERSION}.tar.gz/download | tar xzvf - -C /var/www/html \
&& mv /var/www/html/mantisbt-${MANTISBT_VERSION} /var/www/html/mantisbt \
&& chown -R root:root /var/www \
&& chmod -R 775 /var/www \
&& echo -e "${MANTISBT}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/mantisbt \
&& chmod a+x /etc/init.d/mantisbt \
&& ln -s /etc/init.d/mantisbt /etc/rcD.d/S40mantisbt

24
ReadMe.txt Normal file
View File

@ -0,0 +1,24 @@
Welcome to Rx3-Docker/MantisBT docker image!
This project aims to build a MantisBT docker image.
Features:
- Curtently based on rx3-docker/php-apache:1.4.0-mga9 & rx3-docker/postgresql:1.1.0-mga9 images,
- Sync with MantisBT 2.27.1.
Note:
The following SQL have to been executed on mantisdb with postgres user:
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO mantisbt;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO mantisbt;
Enjoy it!
Your Rx3 Team.
--
arnaud@rx3.net
https://git.rx3.org/gitea/rx3-docker/mantisbt

6
ReleaseNotes.txt Normal file
View File

@ -0,0 +1,6 @@
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/MantisBT V 1.0.0 - A. GIBERT - 2025/03/06
------------------------------------------------------------------------------------------------------------------------------------
- Initial release,
- Use based on php-apache:1.4.0-mga9 & postgresql:1.1.0-mga9 images.

98
compose.yaml Normal file
View File

@ -0,0 +1,98 @@
# Rx3-Docker/MantisBT Docker Image
#-------------------------------------------------------------------------------
name: ${HOST_NAME_PREFIX}
services:
database:
container_name: ${DB_HOST_NAME}
hostname: ${DB_HOST_NAME}
image: ${DB_IMG_URL}
restart: unless-stopped
environment:
POSTGRESQL_UID: ${DB_USER_ID}
POSTGRESQL_GID: ${DB_GROUP_ID}
POSTGRESQL_POSTGRES_PASSWORD: ${DB_POSTGRES_PASSWORD}
POSTGRESQL_DATABASE: ${DB_NAME}
POSTGRESQL_USER: ${DB_USER}
POSTGRESQL_PASSWORD: ${DB_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "sh -c 'pg_isready -U ${DB_USER} -d ${DB_NAME}'"]
interval: 10s
timeout: 3s
retries: 3
volumes:
- ./${DB_LIB_EXT}:${DB_LIB_INT}
- ./${DB_LOG_INIT_EXT}:${DB_LOG_INIT_INT}
- ./${DB_LOG_SV_EXT}:${DB_LOG_SV_INT}
- ./${DB_LOG_MAIN_EXT}:${DB_LOG_MAIN_INT}
networks:
- appl
# ports:
# - "127.0.0.1:${DB_PORT_SV_EXT}:${DB_PORT_SV_INT}"
# - "127.0.0.1:${DB_PORT_MAIN_EXT}:${DB_PORT_MAIN_INT}"
#-------------------------------------------------------------------------------
webapp:
container_name: ${WA_HOST_NAME}
hostname: ${WA_HOST_NAME}
image: ${WA_IMG_URL}
dns:
- 10.0.0.1
build:
context: .
args:
IMG_NAME: ${WA_IMG_URL}
IMG_NAME_FULL: ${WA_IMG_NAME_FULL}
IMG_VERSION: ${WA_IMG_VERSION}
IMG_MAINTAINER: ${APPL_MAINTAINER}
IMG_FROM_URL: ${WA_IMG_FROM_URL}
restart: unless-stopped
depends_on:
database:
condition: service_healthy
environment:
SERVER_CROND_ENABLED: ${WA_CROND_ENABLED}
APACHE_UID: ${WA_USER_ID}
APACHE_GID: ${WA_GROUP_ID}
APACHE_DOC_ROOT: ${APACHE_DOC_ROOT}
volumes:
- ./${WA_LOG_INIT_EXT}:${WA_LOG_INIT_INT}
- ./${WA_LOG_SV_EXT}:${WA_LOG_SV_INT}
- ./${WA_LOG_HTTPD_EXT}:${WA_LOG_HTTPD_INT}
- ./${WA_LOG_MAIN_EXT}:${WA_LOG_MAIN_INT}
networks:
- appl
ports:
- "127.0.0.1:${WA_PORT_SV_EXT}:${WA_PORT_SV_INT}"
- "127.0.0.1:${WA_PORT_MAIN_EXT}:${WA_PORT_MAIN_INT}"
networks:
appl:
name: ${NETWORK_NAME}
driver: bridge
driver_opts:
com.docker.network.bridge.name: ${NETWORK_IF_NAME}
# ipam:
# config:
# - subnet: 10.2.33.0/24
# gateway: 10.2.33.254

116
env.dist Normal file
View File

@ -0,0 +1,116 @@
# Rx3-Docker/MantisBT Docker Image
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Global Settings
#-------------------------------------------------------------------------------
ORG_NAME="rx3-docker"
ORG_REGISTRY="docker.xor.rx3:5000"
ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}"
#-------------------------------------------------------------------------------
# Image Settings
#-------------------------------------------------------------------------------
APPL_NAME="mantisbt"
APPL_NAME_FULL="Mantis Bug Tracker"
APPL_NAME_SHORT="mantisbt"
APPL_ORG="rx3-docker"
APPL_VERSION="1.0.0"
APPL_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
#-------------------------------------------------------------------------------
# User Settings
#-------------------------------------------------------------------------------
#APPL_ENV="prd"
#APPL_ENV="tst"
#APPL_ENV="int"
APPL_ENV="dvp"
MUSIC_REPO="./opt/music"
VIDEO_REPO="./opt/video"
#-------------------------------------------------------------------------------
# Common
#-------------------------------------------------------------------------------
if [[ "${APPL_ENV}" != "prd" ]]
then
APPL_SUFFIX="-${APPL_ENV}"
PORT_ENV_OFFSET=100
else
APPL_SUFFIX=""
PORT_ENV_OFFSET=0
fi
ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}"
APPL_URL_PREFIX="${ORG_REGISTRY}/${APPL_ORG}/${APPL_NAME_SHORT}"
HOST_NAME_PREFIX=${APPL_NAME_SHORT}${APPL_SUFFIX}
PORT_ENV_OFFSET=0
PORT_SV_INT=9001
PORT_SV_OFFSET=1000
NETWORK_NAME=${HOST_NAME_PREFIX}
NETWORK_IF_NAME=br-${APPL_NAME_SHORT}-${APPL_ENV}
DOCKER_TOOLS_DEBUG=FALSE
#DOCKER_TOOLS_VOLUME=MIXED
DOCKER_TOOLS_VOLUME=MERGED
DOCKER_TOOLS_EXEPTION_LIBS="postgres:pgsql"
#------------------+----------+--------------------------+--------------------+------------------+-------------------------------+----------------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+
# | 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 DB database ${ORG_URL_PREFIX} postgresql - 1.1.0-mga9 - - - postgres - - 5432 - - postgres postgres
docker_service_add WA webapp ${ORG_URL_PREFIX} mantisbt "Rx3-Docker/MantisBT" ${APPL_VERSION}-mga9 ${ORG_URL_PREFIX} php-apache 1.4.0-mga9 - - 8085 80 - - apache apache
#-------------------------------------------------------------------------------
# Database
#-------------------------------------------------------------------------------
DB_POSTGRES_PASSWORD="postgresadmin"
DB_NAME="mantisbt"
DB_USER="mantisbt"
DB_PASSWORD="mantisbtadmin"
DB_SERVER_NAME="MantisBT"
#-------------------------------------------------------------------------------
# Tools
#-------------------------------------------------------------------------------
TOOLS_RPC_ENABLED="FALSE"
#-------------------------------------------------------------------------------
# WebApp
#-------------------------------------------------------------------------------
APACHE_DOC_ROOT=/var/www/html
WA_CROND_ENABLED="FALSE"
WA_LOG_HTTPD_INT="/var/log/httpd"
WA_LOG_HTTPD_EXT="./var/log/httpd-webapp"