summaryrefslogtreecommitdiffstats
path: root/Applications/phpmyadmin
diff options
context:
space:
mode:
Diffstat (limited to 'Applications/phpmyadmin')
-rw-r--r--Applications/phpmyadmin/Dockerfile10
-rw-r--r--Applications/phpmyadmin/config.inc.php28
2 files changed, 33 insertions, 5 deletions
diff --git a/Applications/phpmyadmin/Dockerfile b/Applications/phpmyadmin/Dockerfile
index 57533e9..91c7d25 100644
--- a/Applications/phpmyadmin/Dockerfile
+++ b/Applications/phpmyadmin/Dockerfile
@@ -4,11 +4,11 @@ MAINTAINER Christophe LARUE <dev@startx.fr>
USER root
ENV APP_PATH=/opt/app-root/src
RUN cd $APP_PATH && \
- wget -q https://files.phpmyadmin.net/phpMyAdmin/4.7.3/phpMyAdmin-4.7.3-all-languages.zip && \
- unzip phpMyAdmin-4.7.3-all-languages.zip && \
- rm -f phpMyAdmin-4.7.3-all-languages.zip && \
- mv phpMyAdmin-4.7.3-all-languages/* ./ && \
- rm -rf phpMyAdmin-4.7.3-all-languages && \
+ wget -q https://files.phpmyadmin.net/phpMyAdmin/4.7.7/phpMyAdmin-4.7.7-all-languages.zip && \
+ unzip phpMyAdmin-4.7.7-all-languages.zip && \
+ rm -f phpMyAdmin-4.7.7-all-languages.zip && \
+ mv phpMyAdmin-4.7.7-all-languages/* ./ && \
+ rm -rf phpMyAdmin-4.7.7-all-languages && \
rm -f config.sample.inc.php && \
chown -R 1001:0 $APP_PATH && \
chmod -R ug+rwx $APP_PATH
diff --git a/Applications/phpmyadmin/config.inc.php b/Applications/phpmyadmin/config.inc.php
index 46d5e70..1f1288b 100644
--- a/Applications/phpmyadmin/config.inc.php
+++ b/Applications/phpmyadmin/config.inc.php
@@ -59,6 +59,34 @@ if(getenv('DB_SERVICE_USER') != '') {
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
}
+elseif(getenv('DB_SERVICE_HOST') != '') {
+ $i++;
+ $cfg['Servers'][$i]['extension'] = 'mysqli';
+ $cfg['Servers'][$i]['host'] = getenv('DB_SERVICE_HOST');
+ if (getenv('DB_SERVICE_PORT'))
+ $cfg['Servers'][$i]['port'] = getenv('DB_SERVICE_PORT');
+ else
+ $cfg['Servers'][$i]['port'] = 3306;
+
+ if (getenv('DB_SERVICE_CONTROL_USER')) {
+ $cfg['Servers'][$i]['controluser'] = getenv('DB_SERVICE_CONTROL_USER');
+ $cfg['Servers'][$i]['controlpass'] = getenv('DB_SERVICE_CONTROL_PASSWORD');
+ }
+}
+
+if(getenv('DB_EXTRA_HOSTS') != '') {
+ $list = explode(",", getenv('DB_EXTRA_HOSTS'));
+ foreach ($list as $item) {
+ $pair = explode(":", $item);
+ if (!$pair[1]) $pair[1] = 3306;
+
+ $i++;
+ $cfg['Servers'][$i]['extension'] = 'mysqli';
+ $cfg['Servers'][$i]['host'] = $pair[0];
+ $cfg['Servers'][$i]['port'] = $pair[1];
+ }
+}
+
/**
* phpMyAdmin configuration storage settings.
*/