Navigation Menu

Skip to content

Commit

Permalink
Updated for installing config.userdef.inc.php hook to update PHPMYADM…
Browse files Browse the repository at this point in the history
…IN custom user setttings without modifying/overriding the config.inc.php file.
  • Loading branch information
Douglas Wagner committed Jul 11, 2016
1 parent e713caa commit 4cadf08
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions config.inc.php
Expand Up @@ -55,3 +55,7 @@
/* Uploads setup */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

/* Include User Defined Settings Hook */
include('./config.userdef.inc.php');

4 changes: 4 additions & 0 deletions run.sh
Expand Up @@ -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 \
Expand Down

0 comments on commit 4cadf08

Please sign in to comment.