Get rid of hard coded IPs (#441)
Replace them with: * containers' hostnames * gateway's IP address for default SMTP_HOST * Core: when SMTP_HOST undef, echo the default value * docker-compose: add port mapping * docker-compose: drop network driver conf * Exim macro: use localhost as LMTP host * Update README.md * docker-compose: Limit port mapping to loopback * Update other docker-compose example files
This commit is contained in:
@@ -53,6 +53,11 @@ function check_or_create () {
|
||||
# END
|
||||
# }
|
||||
|
||||
# SMTP_HOST defaults to the gateway
|
||||
if [[ ! -v SMTP_HOST ]]; then
|
||||
export SMTP_HOST=$(/sbin/ip route | awk '/default/ { print $3 }')
|
||||
fi
|
||||
|
||||
# Check if $SECRET_KEY is defined, if not, bail out.
|
||||
if [[ ! -v SECRET_KEY ]]; then
|
||||
echo "SECRET_KEY is not defined. Aborting."
|
||||
|
||||
Reference in New Issue
Block a user