refactor: move hostname detection to entrypoint
This commit is contained in:
parent
e17624864c
commit
720d110135
@ -23,7 +23,7 @@ RUN apk --no-cache add \
|
|||||||
|
|
||||||
# set environment variables
|
# set environment variables
|
||||||
ENV TZ=Etc/UTC
|
ENV TZ=Etc/UTC
|
||||||
ENV LOCAL_HOSTNAME=${HOSTNAME}
|
ENV LOCAL_HOSTNAME=""
|
||||||
ENV LOCAL_DOMAINNAME=""
|
ENV LOCAL_DOMAINNAME=""
|
||||||
ENV LOCAL_ENCRYPTION=false
|
ENV LOCAL_ENCRYPTION=false
|
||||||
ENV SMARTHOST=""
|
ENV SMARTHOST=""
|
||||||
|
@ -33,7 +33,7 @@ else
|
|||||||
|
|
||||||
# set failsafes
|
# set failsafes
|
||||||
[ -z "$SMARTHOST_PORT" ] && SMARTHOST_PORT=587
|
[ -z "$SMARTHOST_PORT" ] && SMARTHOST_PORT=587
|
||||||
[ -z "$LOCAL_HOSTNAME" ] && LOCAL_HOSTNAME="smarthost"
|
[ -z "$LOCAL_HOSTNAME" ] && LOCAL_HOSTNAME="$(uname -n)"
|
||||||
[ -z "$LOCAL_DOMAINNAME" ] && LOCAL_DOMAINNAME="${LOCAL_HOSTNAME#*.}"
|
[ -z "$LOCAL_DOMAINNAME" ] && LOCAL_DOMAINNAME="${LOCAL_HOSTNAME#*.}"
|
||||||
|
|
||||||
printf "done\n"
|
printf "done\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user