diff --git a/README.md b/README.md index 7eabeb1f..c15445e6 100644 --- a/README.md +++ b/README.md @@ -210,11 +210,17 @@ variables (e.g. `URL_BASE_TRUSTED=https://mailtrain.domain.com (and more env-var | Parameter | Description | | --------- | ----------- | +| PORT_TRUSTED | sets the trusted port of the instance (default: 3000) | +| PORT_SANDBOX | sets the sandbox port of the instance (default: 3003) | +| PORT_PUBLIC | sets the public port of the instance (default: 3004) | | URL_BASE_TRUSTED | sets the trusted url of the instance (default: http://localhost:3000) | | URL_BASE_SANDBOX | sets the sandbox url of the instance (default: http://localhost:3003) | | URL_BASE_PUBLIC | sets the public url of the instance (default: http://localhost:3004) | +| WWW_HOST | sets the address that the server binds to (default: 0.0.0.0) | | WWW_PROXY | use if Mailtrain is behind an http reverse proxy (default: false) | +| WWW_SECRET | sets the secret for the express session (default: `$(pwgen -1)`) | | MONGO_HOST | sets mongo host (default: mongo) | +| WITH_REDIS | enables or disables redis (default: true) | | REDIS_HOST | sets redis host (default: redis) | | MYSQL_HOST | sets mysql host (default: mysql) | | MYSQL_DATABASE | sets mysql database (default: mailtrain) | @@ -229,6 +235,7 @@ variables (e.g. `URL_BASE_TRUSTED=https://mailtrain.domain.com (and more env-var | LDAP_FILTER | LDAP filter | | LDAP_BASEDN | LDAP base DN | | LDAP_UIDTAG | LDAP UID tag (e.g. uid/cn/username) | +| WITH_ZONE_MTA | enables or disables builtin Zone-MTA (default: true) | | POOL_NAME | sets builtin Zone-MTA pool name (default: os.hostname()) | If you don't want to modify the original `docker-compose.yml`, you can put your overrides to another file (e.g. `docker-compose.override.yml`) -- like the one below. diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index d629fcd7..f2e879f9 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -5,10 +5,15 @@ set -e default_filter="(|(username={{username}})(mail={{username}}))" -URL_BASE_TRUSTED=${URL_BASE_TRUSTED:-'http://localhost:3000'} -URL_BASE_SANDBOX=${URL_BASE_SANDBOX:-'http://localhost:3003'} -URL_BASE_PUBLIC=${URL_BASE_PUBLIC:-'http://localhost:3004'} +PORT_TRUSTED=${PORT_TRUSTED:-'3000'} +PORT_SANDBOX=${PORT_SANDBOX:-'3003'} +PORT_PUBLIC=${PORT_PUBLIC:-'3004'} +URL_BASE_TRUSTED=${URL_BASE_TRUSTED:-"http://localhost:${PORT_TRUSTED}"} +URL_BASE_SANDBOX=${URL_BASE_SANDBOX:-"http://localhost:${PORT_SANDBOX}"} +URL_BASE_PUBLIC=${URL_BASE_PUBLIC:-"http://localhost:${PORT_PUBLIC}"} +WWW_HOST=${WWW_HOST:-'0.0.0.0'} WWW_PROXY=${WWW_PROXY:-'false'} +WWW_SECRET=${WWW_SECRET:-$(pwgen -1)} WITH_LDAP=${WITH_LDAP:-'false'} LDAP_HOST=${LDAP_HOST:-'ldap'} LDAP_PORT=${LDAP_PORT:-'389'} @@ -22,11 +27,13 @@ LDAP_MAILTAG=${LDAP_MAILTAG:-'mail'} LDAP_NAMETAG=${LDAP_NAMETAG:-'username'} LDAP_METHOD=${LDAP_METHOD:-'ldapjs'} MONGO_HOST=${MONGO_HOST:-'mongo'} +WITH_REDIS=${WITH_REDIS:-'true'} REDIS_HOST=${REDIS_HOST:-'redis'} MYSQL_HOST=${MYSQL_HOST:-'mysql'} MYSQL_DATABASE=${MYSQL_DATABASE:-'mailtrain'} MYSQL_USER=${MYSQL_USER:-'mailtrain'} MYSQL_PASSWORD=${MYSQL_PASSWORD:-'mailtrain'} +WITH_ZONE_MTA=${WITH_ZONE_MTA:-'true'} POOL_NAME=${POOL_NAME:-$(hostname)} # Warning for users that already rely on the MAILTRAIN_SETTING variable @@ -45,9 +52,12 @@ else # Basic configuration cat >> server/config/production.yaml <