Use WWW_HOST and WWW_SECRET env vars in docker-entrypoint.sh
This commit is contained in:
parent
f1cd83b734
commit
417b208bfe
2 changed files with 6 additions and 2 deletions
|
@ -213,7 +213,9 @@ variables (e.g. `URL_BASE_TRUSTED=https://mailtrain.domain.com (and more env-var
|
|||
| 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) |
|
||||
| REDIS_HOST | sets redis host (default: redis) |
|
||||
| MYSQL_HOST | sets mysql host (default: mysql) |
|
||||
|
|
|
@ -8,7 +8,9 @@ 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'}
|
||||
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'}
|
||||
|
@ -45,9 +47,9 @@ else
|
|||
# Basic configuration
|
||||
cat >> server/config/production.yaml <<EOT
|
||||
www:
|
||||
host: 0.0.0.0
|
||||
host: $WWW_HOST
|
||||
proxy: $WWW_PROXY
|
||||
secret: "`pwgen -1`"
|
||||
secret: $WWW_SECRET
|
||||
trustedUrlBase: $URL_BASE_TRUSTED
|
||||
sandboxUrlBase: $URL_BASE_SANDBOX
|
||||
publicUrlBase: $URL_BASE_PUBLIC
|
||||
|
|
Loading…
Reference in a new issue