- Add PostgreSQL client package to allow PHPPGAdmin database export,

- Fix PHPPGAdmin config.
This commit is contained in:
Arnaud G. GIBERT 2024-12-16 17:37:32 +01:00
parent c174808c5a
commit 86f481f16a
4 changed files with 24 additions and 9 deletions

View File

@ -33,9 +33,7 @@ ARG REDPANDA_CONSOLE_CONFIG="${REDPANDA_CONSOLE_HOME}/etc/redpanda-console-confi
#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ARG TOOLSD='#!/bin/bash \n\ ARG TOOLSD='#!/bin/bash \n\
\n\ \n\
sed -i "s/\$conf\[`servers`\]\[0\]\[`desc`\]/\/\/\$conf\[`servers`\]\[0\]\[`desc`\]/" '${PHPPGADMIN_CONFIG}' \n\ sed -i "s/\t\$conf\[`servers`\]/\t\/\/\ $conf\[`servers`\]/" '${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/\$conf\[`extra_login_security`\] = true;/\$conf\[`extra_login_security`\] = false;/" '${PHPPGADMIN_CONFIG}' \n\
sed -i "s/?>//" '${PHPPGADMIN_CONFIG}' \n\ sed -i "s/?>//" '${PHPPGADMIN_CONFIG}' \n\
\n\ \n\
@ -55,13 +53,22 @@ while [[ ${i} -lt ${#host[@]} ]]
do \n\ do \n\
for var in desc host port \n\ for var in desc host port \n\
do \n\ do \n\
eval echo "`\$conf`[\`servers\`][${i}][\`${var}\`] = \`\${${var}[${i}]}\`\;" >> '${PHPPGADMIN_CONFIG}' \n\ eval echo -e "`\t\$conf`[\`servers\`][${i}][\`${var}\`]` = `\`\${${var}[${i}]}\`\;" >> '${PHPPGADMIN_CONFIG}' \n\
done \n\ done \n\
\n\
echo -e "\t\$conf[`servers`][${i}][`sslmode`] = `allow`;" >> '${PHPPGADMIN_CONFIG}' \n\
echo -e "\t\$conf[`servers`][${i}][`defaultdb`] = `postgres`;" >> '${PHPPGADMIN_CONFIG}' \n\
echo -e "\t\$conf[`servers`][${i}][`pg_dump_path`] = `/usr/bin/pg_dump`;" >> '${PHPPGADMIN_CONFIG}' \n\
echo -e "\t\$conf[`servers`][${i}][`pg_dumpall_path`] = `/usr/bin/pg_dumpall`;" >> '${PHPPGADMIN_CONFIG}' \n\
\n\
i=$(( ${i} + 1)) \n\ i=$(( ${i} + 1)) \n\
done \n\ done \n\
\n\ \n\
echo "?>" >> '${PHPPGADMIN_CONFIG}'' echo "?>" >> '${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\
#------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ARG REDPANDA_CONSOLED='#!/bin/bash \n\ ARG REDPANDA_CONSOLED='#!/bin/bash \n\
@ -86,14 +93,13 @@ command='${REDPANDA_CONSOLE_HOME}'/bin/redpanda-console -config.filepath '${REDP
#RUN urpmi --force wget phpmyadmin \ RUN urpmi --force wget postgresql15 \
RUN urpmi --force wget \
&& mkdir -p /var/www/appl \ && mkdir -p /var/www/appl \
&& wget -q -O- "https://github.com/${PHPPGADMIN_OWNER}/phppgadmin/archive/${PHPPGADMIN_COMMIT}.tar.gz" | tar xzf - -C ${APACHE_DOC_ROOT} \ && wget -q -O- "https://github.com/${PHPPGADMIN_OWNER}/phppgadmin/archive/${PHPPGADMIN_COMMIT}.tar.gz" | tar xzf - -C ${APACHE_DOC_ROOT} \
&& mv ${APACHE_DOC_ROOT}/phppgadmin-${PHPPGADMIN_COMMIT} ${APACHE_DOC_ROOT}/phppgadmin \ && mv ${APACHE_DOC_ROOT}/phppgadmin-${PHPPGADMIN_COMMIT} ${APACHE_DOC_ROOT}/phppgadmin \
&& sed -i 's/$_SERVER\['\''REQUEST_URI'\''\]/preg_replace(\"\/^\\\/phppgadmin\\\/\/", "", $_SERVER['\''REQUEST_URI'\''])/g' ${APACHE_DOC_ROOT}/phppgadmin/display.php \ && sed -i 's/$_SERVER\['\''REQUEST_URI'\''\]/preg_replace(\"\/^\\\/phppgadmin\\\/\/", "", $_SERVER['\''REQUEST_URI'\''])/g' ${APACHE_DOC_ROOT}/phppgadmin/display.php \
&& cp ${APACHE_DOC_ROOT}/phppgadmin/conf/config.inc.php-dist ${APACHE_DOC_ROOT}/phppgadmin/conf/config.inc.php \ && cp ${APACHE_DOC_ROOT}/phppgadmin/conf/config.inc.php-dist ${APACHE_DOC_ROOT}/phppgadmin/conf/config.inc.php \
&& echo -e "${TOOLSD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/toolsd \ && echo -e "${TOOLSD}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/toolsd \
&& chmod a+x /etc/init.d/toolsd \ && chmod a+x /etc/init.d/toolsd \
&& ln -s /etc/init.d/toolsd /etc/rcD.d/S40toolsd \ && ln -s /etc/init.d/toolsd /etc/rcD.d/S40toolsd \
&& mkdir -p ${REDPANDA_CONSOLE_HOME}/bin ${REDPANDA_CONSOLE_HOME}/etc \ && mkdir -p ${REDPANDA_CONSOLE_HOME}/bin ${REDPANDA_CONSOLE_HOME}/etc \

View File

@ -1,3 +1,12 @@
------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/Tools V 1.2.2 - A. GIBERT - 2024/12/16
------------------------------------------------------------------------------------------------------------------------------------
- Add PostgreSQL client package to allow PHPPGAdmin database export,
- Fix PHPPGAdmin config.
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------
Rx3-Docker/Tools V 1.2.1 - A. GIBERT - 2024/12/14 Rx3-Docker/Tools V 1.2.1 - A. GIBERT - 2024/12/14
------------------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------

View File

@ -5,7 +5,7 @@ name: ${HOST_NAME_PREFIX}
services: services:
webtools: tools:
container_name: ${TOOLS_HOST_NAME} container_name: ${TOOLS_HOST_NAME}
hostname: ${TOOLS_HOST_NAME} hostname: ${TOOLS_HOST_NAME}

View File

@ -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 | # | 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.1-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.2-mga9 ${ORG_URL_PREFIX} php-apache 1.4.0-mga9 - - 8070 80 8092 8080 apache apache