add NETDISCO_DOMAIN

This commit is contained in:
Oliver Gorwits
2018-01-19 09:09:48 +00:00
parent 880d5b6951
commit aef290e34c

View File

@@ -18,6 +18,8 @@ BEGIN {
# set up database schema config from simple config vars
if (ref {} eq ref setting('database')) {
# override from env for docker
setting('database')->{name} =
($ENV{NETDISCO_DB_NAME} || $ENV{NETDISCO_DBNAME} || setting('database')->{name});
@@ -111,6 +113,10 @@ setting('dns')->{'ETCHOSTS'} = {};
for keys %AnyEvent::DNS::EtcHosts::HOSTS;
}
# override from env for docker
config->{'domain_suffix'} =
($ENV{NETDISCO_DOMAIN} || config->{'domain_suffix'});
# support unordered dictionary as if it were a single item list
if (ref {} eq ref setting('device_identity')) {
config->{'device_identity'} = [ setting('device_identity') ];