diff --git a/Dockerfile b/Dockerfile index f899547..10f3a09 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,6 +23,9 @@ ARG REDPANDA_CONSOLE_PORT ARG PHPPGADMIN_HTTPD_CONFIG="/etc/httpd/conf/sites.d/default_vhost.d/60-phppgadmin.conf" ARG PHPPGADMIN_CONFIG="/etc/phppgadmin/config.inc.php" +ARG PHPMYADMIN_HTTPD_CONFIG="/etc/httpd/conf/sites.d/default_vhost.d/60-phpmyadmin.conf" +ARG PHPMYADMIN_CONFIG="/etc/phpmyadmin/config.inc.php" + ARG REDPANDA_CONSOLE_HOME="/opt/appl/redpanda_console" ARG REDPANDA_CONSOLE_CONFIG="${REDPANDA_CONSOLE_HOME}/etc/redpanda-console-config.yaml" @@ -31,6 +34,8 @@ ARG REDPANDA_CONSOLE_CONFIG="${REDPANDA_CONSOLE_HOME}/etc/redpanda-console-confi #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ARG TOOLSD='#!/bin/bash \n\ \n\ +# PostgreSQL \n\ + \n\ cp '${PHPPGADMIN_CONFIG}'.ref '${PHPPGADMIN_CONFIG}' \n\ chown apache:root '${PHPPGADMIN_CONFIG}' \n\ \n\ @@ -64,7 +69,46 @@ do i=$(( ${i} + 1)) \n\ done \n\ \n\ -echo "?>" >> '${PHPPGADMIN_CONFIG}'' +echo "?>" >> '${PHPPGADMIN_CONFIG}' \n\ + \n\ + \n\ +# MariaDB \n\ + \n\ +cp '${PHPMYADMIN_CONFIG}'.ref '${PHPMYADMIN_CONFIG}' \n\ +chown apache:root '${PHPMYADMIN_CONFIG}' \n\ + \n\ +sed -i -E `s/(^\$cfg`"\[`blowfish_secret`\] = `)([^`]{32})[^`]*`/\1\2`/g" '${PHPMYADMIN_CONFIG}' \n\ +sed -i "s/^\$cfg\[`Servers`\]/\/\/\ $cfg\[`Servers`\]/" '${PHPMYADMIN_CONFIG}' \n\ + \n\ +for vars in MARIADB_SERVER_NAME:verbose MARIADB_HOST:host MARIADB_PORT:port \n\ +do \n\ + IFS=":" \n\ + set ${vars} \n\ + \n\ + eval read -r -a $2 \<\<\< "\${$1}" \n\ +done \n\ + \n\ +IFS=" " \n\ + \n\ +i=0 \n\ +while [[ ${i} -lt ${#host[@]} ]] \n\ +do \n\ + j=$(( ${i} + 1)) \n\ + \n\ + for var in verbose host port \n\ + do \n\ + eval echo -e "`\$cfg`[\`Servers\`][${j}][\`${var}\`]` = `\`\${${var}[${i}]}\`\;" >> '${PHPMYADMIN_CONFIG}' \n\ + done \n\ + \n\ + echo -e "\$cfg[`Servers`][${j}][`auth_type`] = `cookie`;" >> '${PHPMYADMIN_CONFIG}' \n\ + echo -e "\$cfg[`Servers`][${j}][`compress`] = `false`;" >> '${PHPMYADMIN_CONFIG}' \n\ + echo -e "\$cfg[`Servers`][${j}][`AllowNoPassword`] = `false`;" >> '${PHPMYADMIN_CONFIG}' \n\ + \n\ + i=$(( ${i} + 1)) \n\ +done \n\ + \n\ +echo "?>" >> '${PHPMYADMIN_CONFIG} + #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -109,12 +153,16 @@ user=apache' RUN . /etc/profile.d/rx3.sh && isl_add ${IMG_URL} \ && urpmi.update -a \ - && urpmi --force wget postgresql15 phppgadmin \ + && urpmi --force wget postgresql15 phppgadmin mariadb-client phpmyadmin \ && mv /etc/httpd/conf/sites.d/phppgadmin.conf ${PHPPGADMIN_HTTPD_CONFIG} \ && sed -i -e '//d' ${PHPPGADMIN_HTTPD_CONFIG} \ - && echo -e "\n AllowOverride All\n Require all granted\n" ${PHPPGADMIN_HTTPD_CONFIG} \ + && echo -e "\n AllowOverride All\n Require all granted\n" >> ${PHPPGADMIN_HTTPD_CONFIG} \ && mv ${PHPPGADMIN_CONFIG} ${PHPPGADMIN_CONFIG}.ref \ - && echo -e "${TOOLSD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/toolsd \ + && mv /etc/httpd/conf/sites.d/phpmyadmin.conf ${PHPMYADMIN_HTTPD_CONFIG} \ + && sed -i -e '//d' ${PHPMYADMIN_HTTPD_CONFIG} \ + && echo -e "\n AllowOverride All\n Require all granted\n" >> ${PHPMYADMIN_HTTPD_CONFIG} \ + && mv ${PHPMYADMIN_CONFIG} ${PHPMYADMIN_CONFIG}.ref \ + && echo -e "${TOOLSD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/toolsd \ && chmod a+x /etc/init.d/toolsd \ && ln -s /etc/init.d/toolsd /etc/rcD.d/S40toolsd \ && mkdir -p ${REDPANDA_CONSOLE_HOME}/bin ${REDPANDA_CONSOLE_HOME}/etc \ diff --git a/ReadMe.txt b/ReadMe.txt index 3a7f79a..4ec7481 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -6,10 +6,11 @@ This project aims to build a docker image embeding some usefull tools to tests o Features: - Curtently based on rx3-docker/php-apache:1.6.2-mga9 image, - - PHPPGAdmin (Mentax GitHub 2025/05/09 10926c9 commit) installed (URL: http://localhost:xxxx/phppgadmin/), + - phpPGAdmin (Mentax GitHub 2025/05/09 10926c9 commit), URL: http://localhost/phppgadmin/, + - phpMyAdmin (V 5.2.3), URL: http://localhost/phpmyadmin/, - PostgreSQL server name, host & port configurable with multi-server support, - - RedPenda Console tool (V 2.7.2), - - RedPenda Console service disbled by default (TOOLS_RPC_ENABLED variable). + - RedPenda Console tool (V 2.7.2) URL: http://localhost:8080/, + - RedPenda Console service disabled by default (TOOLS_RPC_ENABLED variable). diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index a330e66..f14f38c 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,3 +1,11 @@ +------------------------------------------------------------------------------------------------------------------------------------ +Rx3-Docker/Tools V 1.3.0 - A. GIBERT - 2026/02/27 +------------------------------------------------------------------------------------------------------------------------------------ + +- Add PhpMyAdmin. + + + ------------------------------------------------------------------------------------------------------------------------------------ Rx3-Docker/Tools V 1.2.8 - A. GIBERT - 2026/02/16 ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/env.dist b/env.dist index 858d233..24c37ca 100644 --- a/env.dist +++ b/env.dist @@ -30,7 +30,7 @@ PORT_SV_OFFSET=1000 # | 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 TOOLS tools ${ORG_URL_PREFIX} - "Rx3-Docker/Tools" 1.2.8-mga9 ${ORG_URL_PREFIX} php-apache 1.6.2-mga9 - - 8070 80 8092 8080 apache apache +docker_service_add TOOLS tools ${ORG_URL_PREFIX} - "Rx3-Docker/Tools" 1.3.0-mga9 ${ORG_URL_PREFIX} php-apache 1.6.2-mga9 - - 8070 80 8092 8080 apache apache