diff --git a/README.md b/README.md index 96c8898f..dcb01c2e 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,24 @@ Using the docker-compose.yml from https://github.com/phpmyadmin/docker docker-compose up -d ``` +## Adding Custom Configuration + +You can add your own custom config.inc.php settings (such as Configuration Storage setup) +by creating a file named "config.userdef.inc.php" with the various user defined settings +in it, and then linking it into the container using: + +``` +-v /some/local/directory/config.userdef.inc.php:/www/config.userdef.inc.php +``` +On the "docker run" line like this: +``` +docker run --name myadmin -d --link mysql_db_server:db -p 8080:80 -v /some/local/directory/config.userdef.inc.php:/www/config.userdef.inc.php phpmyadmin/phpmyadmin +``` + +See the following links for config file information. +http://docs.phpmyadmin.net/en/latest/config.html#config +http://docs.phpmyadmin.net/en/latest/setup.html + ## Environment variables summary * ``PMA_ARBITRARY`` - when set to 1 connection to the arbitrary server will be allowed diff --git a/config.inc.php b/config.inc.php index 9c93b5bf..2b938920 100644 --- a/config.inc.php +++ b/config.inc.php @@ -55,3 +55,7 @@ /* Uploads setup */ $cfg['UploadDir'] = ''; $cfg['SaveDir'] = ''; + +/* Include User Defined Settings Hook */ +include('./config.userdef.inc.php'); + diff --git a/run.sh b/run.sh index 526fe4be..494e7914 100755 --- a/run.sh +++ b/run.sh @@ -8,6 +8,10 @@ if [ ! -f /www/config.secret.inc.php ] ; then EOT fi +if [ ! -f /www/config.userdef.inc.php ] ; then + touch /www/config.userdef.inc.php +fi + exec php -S 0.0.0.0:80 -t /www/ \ -d upload_max_filesize=$PHP_UPLOAD_MAX_FILESIZE \ -d post_max_size=$PHP_UPLOAD_MAX_FILESIZE \