From a77d08a92c8b2ada3c83e6235b51bd02c9b45e99 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Sat, 11 Nov 2017 13:44:48 +0000 Subject: [PATCH] initial Docker readme --- docker/README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 docker/README.md diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 00000000..20b2a337 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,42 @@ +# Building + +docker build --pull --rm -t postfixadmin-image . + +# Running + +## No config.local.php / no existing setup + +If you do not have a config.local.php, then we fall back to look for environment variables to generate one. + +POSTFIXADMIN\_DB\_TYPE can be one of : + + * mysqli + * pgsql + * sqlite + + +```bash +docker run -e POSTFIXADMIN_DB_TYPE=mysqli \ + -e POSTFIXADMIN_DB_HOST=whatever \ + -e POSTFIXADMIN_DB_USER=user \ + -e POSTFIXADMIN_DB_PASSWORD=topsecret \ + -e POSTFIXADMIN_DB_NAME=postfixadmin \ + --name postfixadmin \ + -p 8080:80 \ + postfixadmin-image +``` + +Note: An sqlite database is used as a fallback if you do not have a config.local.php and do not specify the above variables. + + + +## Existing config.local.php + +```bash +docker run --name postfixadmin -p 8080:80 postfixadmin-image +``` + +## Linking to a MySQL or PostgreSQL container + +If you link the container to a MySQL or PostgreSQL container, then we attempt to generate a valid config.local.php from it. +