mirror of
https://github.com/glenndehaan/unifi-voucher-site.git
synced 2026-03-31 06:24:00 -04:00
Allow configuring the bind address
Adds a config variable for bind address to support working in IPv6 environments.
This commit is contained in:
@@ -158,6 +158,8 @@ services:
|
||||
KIOSK_EMAIL: 'false'
|
||||
# Enable/disable a printer for Kiosk Vouchers (this automatically prints vouchers), currently supported: escpos ip (Example: 192.168.1.10)
|
||||
KIOSK_PRINTER: ''
|
||||
# Specifies the IP address to bind to (such as :: in IPv6 environments)
|
||||
BIND_ADDRESS: '0.0.0.0'
|
||||
# Sets the application Log Level (Valid Options: error|warn|info|debug|trace)
|
||||
LOG_LEVEL: 'info'
|
||||
# Sets the default translation for dropdowns
|
||||
|
||||
@@ -47,6 +47,7 @@ module.exports = {
|
||||
kioskHomepage: config('kiosk_homepage') || (process.env.KIOSK_HOMEPAGE === 'true') || false,
|
||||
kioskEmail: config('kiosk_email') || (process.env.KIOSK_EMAIL === 'true') || false,
|
||||
kioskPrinter: config('kiosk_printer') || process.env.KIOSK_PRINTER || '',
|
||||
bindAddress: config('bind_address') || process.env.BIND_ADDRESS || '0.0.0.0',
|
||||
logLevel: config('log_level') || process.env.LOG_LEVEL || 'info',
|
||||
translationDefault: config('translation_default') || process.env.TRANSLATION_DEFAULT || 'en',
|
||||
translationHiddenLanguages: config('translation_hidden_languages') || process.env.TRANSLATION_HIDDEN_LANGUAGES || '',
|
||||
|
||||
@@ -205,8 +205,8 @@ app.disable('x-powered-by');
|
||||
/**
|
||||
* Start listening on port
|
||||
*/
|
||||
app.listen(3000, '0.0.0.0', async () => {
|
||||
log.info(`[App] Running on: 0.0.0.0:3000`);
|
||||
app.listen(3000, variables.bindAddress, async () => {
|
||||
log.info(`[App] Running on: ${variables.bindAddress}:3000`);
|
||||
await updateCache();
|
||||
|
||||
// Run tasks every 15 minutes
|
||||
|
||||
Reference in New Issue
Block a user