mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 13:27:31 -08:00
🔀 Merge branch 'master' of github.com:n8n-io/n8n
This commit is contained in:
commit
c7a901083b
|
@ -14,6 +14,9 @@ Sets how n8n should be made available.
|
||||||
# The port n8n should be made available on
|
# The port n8n should be made available on
|
||||||
N8N_PORT=5678
|
N8N_PORT=5678
|
||||||
|
|
||||||
|
# The IP address n8n should listen on
|
||||||
|
N8N_LISTEN_ADDRESS=0.0.0.0
|
||||||
|
|
||||||
# This ones are currently only important for the webhook URL creation.
|
# This ones are currently only important for the webhook URL creation.
|
||||||
# So if "WEBHOOK_TUNNEL_URL" got set they do get ignored. It is however
|
# So if "WEBHOOK_TUNNEL_URL" got set they do get ignored. It is however
|
||||||
# encouraged to set them correctly anyway in case they will become
|
# encouraged to set them correctly anyway in case they will become
|
||||||
|
|
|
@ -105,6 +105,7 @@ services:
|
||||||
- N8N_BASIC_AUTH_PASSWORD
|
- N8N_BASIC_AUTH_PASSWORD
|
||||||
- N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
|
- N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
|
||||||
- N8N_PORT=5678
|
- N8N_PORT=5678
|
||||||
|
- N8N_LISTEN_ADDRESS=0.0.0.0
|
||||||
- N8N_PROTOCOL=https
|
- N8N_PROTOCOL=https
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- WEBHOOK_TUNNEL_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
|
- WEBHOOK_TUNNEL_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
|
||||||
|
|
|
@ -182,6 +182,12 @@ const config = convict({
|
||||||
env: 'N8N_PORT',
|
env: 'N8N_PORT',
|
||||||
doc: 'HTTP port n8n can be reached'
|
doc: 'HTTP port n8n can be reached'
|
||||||
},
|
},
|
||||||
|
listen_address: {
|
||||||
|
format: String,
|
||||||
|
default: '0.0.0.0',
|
||||||
|
env: 'N8N_LISTEN_ADDRESS',
|
||||||
|
doc: 'IP address n8n should listen on'
|
||||||
|
},
|
||||||
protocol: {
|
protocol: {
|
||||||
format: ['http', 'https'],
|
format: ['http', 'https'],
|
||||||
default: 'http',
|
default: 'http',
|
||||||
|
|
|
@ -1649,6 +1649,7 @@ class App {
|
||||||
|
|
||||||
export async function start(): Promise<void> {
|
export async function start(): Promise<void> {
|
||||||
const PORT = config.get('port');
|
const PORT = config.get('port');
|
||||||
|
const ADDRESS = config.get('listen_address');
|
||||||
|
|
||||||
const app = new App();
|
const app = new App();
|
||||||
|
|
||||||
|
@ -1667,9 +1668,9 @@ export async function start(): Promise<void> {
|
||||||
server = http.createServer(app.app);
|
server = http.createServer(app.app);
|
||||||
}
|
}
|
||||||
|
|
||||||
server.listen(PORT, async () => {
|
server.listen(PORT, ADDRESS, async () => {
|
||||||
const versions = await GenericHelpers.getVersions();
|
const versions = await GenericHelpers.getVersions();
|
||||||
console.log(`n8n ready on port ${PORT}`);
|
console.log(`n8n ready on ${ADDRESS}, port ${PORT}`);
|
||||||
console.log(`Version: ${versions.cli}`);
|
console.log(`Version: ${versions.cli}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue