8gears / n8n-helm-chart

A Kubernetes Helm chart for n8n a Workflow Automation Tool. Easily automate tasks across different services.
https://artifacthub.io/packages/helm/open-8gears/n8n
Apache License 2.0
187 stars 97 forks source link

How to specify port behind proxy? #1

Closed DanTulovsky closed 3 years ago

DanTulovsky commented 3 years ago

Hi,

I have an envoy_proxy (amabasador) in front of n8n. If I set:

host: myhost.com port: 443 # this is the port of the envoy proxy

then n8n fails to start because it fails to bind to port 443 (since it's not root).

If I leave port as the default, then the external webhook URL is: myhost.com:5678, which doesn't work from the outside.

How can I run n8n on it's default port, but have it properly set the webhook URL to myhost.com:443?

Thank you! Dan

DanTulovsky commented 3 years ago

Specifically, not setting the port sets the POST URL for a github webhook to:

https://myhost.com:5678/webhook/3e5f0bdb-c416-4d1a-b1ec-117aa02f471f/webhook

Which is not available form the outside. Setting the port to 443, leads to the "unable to bind" error.

So I think I just need a way to set the external URL separately from what the server binds to.

DanTulovsky commented 3 years ago

I found https://docs.n8n.io/reference/configuration.html#webhook-url ...

DanTulovsky commented 3 years ago

Hmm.. the chart doesn't seem to provide a way to set "WEBHOOK_TUNNEL_URL"... and there is no way to set arbitrary env variables either.. ?

Vad1mo commented 3 years ago

Everything is supported. Because it is just forwarded as is to N8n.

DanTulovsky commented 3 years ago

Ok.. but how would I set the "WEBHOOK_TUNNEL_URL" environment variable in the helm chart? Under what variable?

DanTulovsky commented 3 years ago

FYI, sent a pull request to handle this, wdyt?

Vad1mo commented 3 years ago

Version 0.2.0 is out (5 Jan, 2021)