🔀 Merge branch 'master' of github.com:n8n-io/n8n

This commit is contained in:
Jan Oberhauser 2020-06-04 17:03:11 +02:00
commit c7a901083b
4 changed files with 13 additions and 2 deletions

View file

@ -14,6 +14,9 @@ Sets how n8n should be made available.
# The port n8n should be made available on
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.
# 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

View file

@ -105,6 +105,7 @@ services:
- N8N_BASIC_AUTH_PASSWORD
- N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
- N8N_PORT=5678
- N8N_LISTEN_ADDRESS=0.0.0.0
- N8N_PROTOCOL=https
- NODE_ENV=production
- WEBHOOK_TUNNEL_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/

View file

@ -182,6 +182,12 @@ const config = convict({
env: 'N8N_PORT',
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: {
format: ['http', 'https'],
default: 'http',

View file

@ -1649,6 +1649,7 @@ class App {
export async function start(): Promise<void> {
const PORT = config.get('port');
const ADDRESS = config.get('listen_address');
const app = new App();
@ -1667,9 +1668,9 @@ export async function start(): Promise<void> {
server = http.createServer(app.app);
}
server.listen(PORT, async () => {
server.listen(PORT, ADDRESS, async () => {
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}`);
});
}