From ccea3a7efc00d9846d4985bb68e7ed742cdb3592 Mon Sep 17 00:00:00 2001 From: "Arnaud G. GIBERT" Date: Sat, 14 Dec 2024 00:04:38 +0100 Subject: [PATCH] - Add multi database support to PHPPGAdmin. --- Dockerfile | 32 ++++++++++++++++++++++++++++---- ReleaseNotes.txt | 8 ++++++++ env.dist | 2 +- 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 030d691..27ea3db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,10 +33,34 @@ ARG REDPANDA_CONSOLE_CONFIG="${REDPANDA_CONSOLE_HOME}/etc/redpanda-console-confi #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ARG TOOLSD='#!/bin/bash \n\ \n\ -sed -i "s/$conf\[`servers`\]\[0\]\[`desc`\] = `PostgreSQL`;/$conf\[`servers`\]\[0\]\[`desc`\] = `${POSTGRESQL_SERVER_NAME}`;/" '${PHPPGADMIN_CONFIG}' \n\ -sed -i "s/$conf\[`servers`\]\[0\]\[`host`\] = ``;/$conf\[`servers`\]\[0\]\[`host`\] = `${POSTGRESQL_HOST}`;/" '${PHPPGADMIN_CONFIG}' \n\ -sed -i "s/$conf\[`servers`\]\[0\]\[`port`\] = 5432;/$conf\[`servers`\]\[0\]\[`port`\] = ${POSTGRESQL_PORT};/" '${PHPPGADMIN_CONFIG}' \n\ -sed -i "s/$conf\[`extra_login_security`\] = true;/$conf\[`extra_login_security`\] = false;/" '${PHPPGADMIN_CONFIG}'' +sed -i "s/\$conf\[`servers`\]\[0\]\[`desc`\]/\/\/\$conf\[`servers`\]\[0\]\[`desc`\]/" '${PHPPGADMIN_CONFIG}' \n\ +sed -i "s/\$conf\[`servers`\]\[0\]\[`host`\]/\/\/\$conf\[`servers`\]\[0\]\[`host`\]/" '${PHPPGADMIN_CONFIG}' \n\ +sed -i "s/\$conf\[`servers`\]\[0\]\[`port`\]/\/\/\$conf\[`servers`\]\[0\]\[`port`\]/" '${PHPPGADMIN_CONFIG}' \n\ +sed -i "s/\$conf\[`extra_login_security`\] = true;/\$conf\[`extra_login_security`\] = false;/" '${PHPPGADMIN_CONFIG}' \n\ +sed -i "s/?>//" '${PHPPGADMIN_CONFIG}' \n\ + \n\ + \n\ +for vars in POSTGRESQL_SERVER_NAME:desc POSTGRESQL_HOST:host POSTGRESQL_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\ + for var in desc host port \n\ + do \n\ + eval echo "`\$conf`[\`servers\`][${i}][\`${var}\`] = \`\${${var}[${i}]}\`\;" >> '${PHPPGADMIN_CONFIG}' \n\ + done \n\ + i=$(( ${i} + 1)) \n\ +done \n\ + \n\ +echo "?>" >> '${PHPPGADMIN_CONFIG}'' #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 9c6e0d7..a81a231 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,3 +1,11 @@ +------------------------------------------------------------------------------------------------------------------------------------ +Rx3-Docker/Tools V 1.2.1 - A. GIBERT - 2024/12/14 +------------------------------------------------------------------------------------------------------------------------------------ + +- Add multi database support to PHPPGAdmin. + + + ------------------------------------------------------------------------------------------------------------------------------------ Rx3-Docker/Tools V 1.2.0 - A. GIBERT - 2024/11/24 ------------------------------------------------------------------------------------------------------------------------------------ diff --git a/env.dist b/env.dist index 3c79fbc..20a8409 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.0-mga9 ${ORG_URL_PREFIX} php-apache 1.4.0-mga9 - - 8070 80 8092 8080 apache apache +docker_service_add TOOLS tools ${ORG_URL_PREFIX} - "Rx3-Docker/Tools" 1.2.1-mga9 ${ORG_URL_PREFIX} php-apache 1.4.0-mga9 - - 8070 80 8092 8080 apache apache