diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2018-03-23 05:11:51 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2018-03-23 05:11:51 +0100 |
commit | d668184dc124aa72b06799c07b6ab5bddb1799f3 (patch) | |
tree | ec7f79628e5da45c86c29a4c0bf7cc51d5107442 /Applications/phpmyadmin | |
parent | ac061ade298a8cf3a50b801ed888a28d7869dea5 (diff) | |
download | phpmyadmin-d668184dc124aa72b06799c07b6ab5bddb1799f3.tar.gz phpmyadmin-d668184dc124aa72b06799c07b6ab5bddb1799f3.tar.bz2 phpmyadmin-d668184dc124aa72b06799c07b6ab5bddb1799f3.tar.xz phpmyadmin-d668184dc124aa72b06799c07b6ab5bddb1799f3.zip |
Extend configuration optionsands
Diffstat (limited to 'Applications/phpmyadmin')
-rw-r--r-- | Applications/phpmyadmin/Dockerfile | 10 | ||||
-rw-r--r-- | Applications/phpmyadmin/config.inc.php | 28 |
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. */ |