From a0fb843bdcfc7f917438fe76c8bb01db087bd60b Mon Sep 17 00:00:00 2001 From: startxfr Date: Sun, 23 Jul 2017 16:25:23 +0200 Subject: change in phpmyadmin for openshift --- Applications/phpmyadmin/Dockerfile | 22 ++++++++++++++-------- Applications/phpmyadmin/config.inc.php | 24 +++++++++++++++--------- 2 files changed, 29 insertions(+), 17 deletions(-) (limited to 'Applications/phpmyadmin') diff --git a/Applications/phpmyadmin/Dockerfile b/Applications/phpmyadmin/Dockerfile index 855e1ad..57533e9 100644 --- a/Applications/phpmyadmin/Dockerfile +++ b/Applications/phpmyadmin/Dockerfile @@ -1,13 +1,19 @@ -FROM startx/sv-php +FROM centos/php-70-centos7:latest MAINTAINER Christophe LARUE +USER root +ENV APP_PATH=/opt/app-root/src RUN cd $APP_PATH && \ - wget -q https://files.phpmyadmin.net/phpMyAdmin/4.5.2/phpMyAdmin-4.5.2-all-languages.zip && \ - unzip phpMyAdmin-4.5.2-all-languages.zip && \ - rm -f phpMyAdmin-4.5.2-all-languages.zip && \ - mv phpMyAdmin-4.5.2-all-languages/* ./ && \ - rm -rf phpMyAdmin-4.5.2-all-languages + 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 && \ + rm -f config.sample.inc.php && \ + chown -R 1001:0 $APP_PATH && \ + chmod -R ug+rwx $APP_PATH COPY config.inc.php $APP_PATH/config.inc.php -EXPOSE 80 443 -CMD [ "/bin/run.sh" ] \ No newline at end of file +USER 1001 +EXPOSE 8080 +CMD $STI_SCRIPTS_PATH/run \ No newline at end of file diff --git a/Applications/phpmyadmin/config.inc.php b/Applications/phpmyadmin/config.inc.php index 110f2aa..eadbfcf 100644 --- a/Applications/phpmyadmin/config.inc.php +++ b/Applications/phpmyadmin/config.inc.php @@ -1,20 +1,20 @@ . + * or at . * * @package PhpMyAdmin */ + /** * This is needed for cookie based authentication to encrypt password in - * cookie + * cookie. Needs to be 32 chars long. */ -$cfg['blowfish_secret'] = 'SECRET'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ +$cfg['blowfish_secret'] = 'SECRET^Ù^sdÙq56s,d46?qsd,6q#d7ù6$d465fg4,,f6g;8!sdfs6'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */ $cfg['PmaNoRelation_DisableWarning'] = true; /** @@ -26,13 +26,15 @@ $i = 0; * First server */ if(getenv('MARIADB_ENV_MYSQL_USER') != '') { - $i++; +$i++; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['host'] = getenv('MARIADB_PORT_3306_TCP_ADDR'); $cfg['Servers'][$i]['port'] = getenv('MARIADB_PORT_3306_TCP_PORT'); $cfg['Servers'][$i]['user'] = getenv('MARIADB_ENV_MYSQL_USER'); $cfg['Servers'][$i]['password'] = getenv('MARIADB_ENV_MYSQL_PASSWORD'); + $cfg['Servers'][$i]['compress'] = false; + $cfg['Servers'][$i]['AllowNoPassword'] = false; } if(getenv('MARIADB2_ENV_MYSQL_USER') != '') { @@ -43,6 +45,8 @@ if(getenv('MARIADB2_ENV_MYSQL_USER') != '') { $cfg['Servers'][$i]['port'] = getenv('MARIADB2_PORT_3306_TCP_PORT'); $cfg['Servers'][$i]['user'] = getenv('MARIADB2_ENV_MYSQL_USER'); $cfg['Servers'][$i]['password'] = getenv('MARIADB2_ENV_MYSQL_PASSWORD'); + $cfg['Servers'][$i]['compress'] = false; + $cfg['Servers'][$i]['AllowNoPassword'] = false; } if(getenv('DB_ENV_MYSQL_USER') != '') { @@ -53,10 +57,13 @@ if(getenv('DB_ENV_MYSQL_USER') != '') { $cfg['Servers'][$i]['port'] = getenv('DB_PORT_3306_TCP_PORT'); $cfg['Servers'][$i]['user'] = getenv('DB_ENV_MYSQL_USER'); $cfg['Servers'][$i]['password'] = getenv('DB_ENV_MYSQL_PASSWORD'); + $cfg['Servers'][$i]['compress'] = false; + $cfg['Servers'][$i]['AllowNoPassword'] = false; } /** * phpMyAdmin configuration storage settings. */ + /* User used to manipulate with storage */ // $cfg['Servers'][$i]['controlhost'] = ''; // $cfg['Servers'][$i]['controlport'] = ''; @@ -84,12 +91,11 @@ if(getenv('DB_ENV_MYSQL_USER') != '') { // $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; // $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; // $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; -/* Contrib / Swekey authentication */ -// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf'; /** * End of servers configuration */ + /** * Directories for saving/loading files from server */ @@ -172,5 +178,5 @@ $cfg['SaveDir'] = ''; /** * You can find more configuration options in the documentation - * in the doc/ folder or at . - */ + * in the doc/ folder or at . + */ \ No newline at end of file -- cgit v1.2.3