config bind host

This commit is contained in:
Evert Prants 2022-03-26 14:41:27 +02:00
parent 5ec2c33a5b
commit 5c4b83fa35
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -21,6 +21,7 @@ import { logger } from './log/Logger';
import { Managed } from './managed'; import { Managed } from './managed';
const port = parseInt(process.env.PORT || '9129', 10); const port = parseInt(process.env.PORT || '9129', 10);
const bind = process.env.BIND_ADDRESS || '0.0.0.0';
const cacheTTL = parseInt(process.env.CACHE_TTL || '2629746', 10); const cacheTTL = parseInt(process.env.CACHE_TTL || '2629746', 10);
const dir = process.env.ZONEFILES || '.'; const dir = process.env.ZONEFILES || '.';
@ -591,7 +592,7 @@ async function load() {
} }
} }
app.listen(port, () => logger.info(`listening on ${port}`)); app.listen(port, bind, () => logger.info(`listening on ${port}`));
} }
if (process.argv.includes('genkey')) { if (process.argv.includes('genkey')) {