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
207 stars 102 forks source link

How do add external js libraries? #2

Closed DanTulovsky closed 2 years ago

DanTulovsky commented 3 years ago

Hi,

How can I add external js libraries using this helm chart?

Thank you Dan

Vad1mo commented 3 years ago

Don’t know can you do it with n8n?

DanTulovsky commented 3 years ago

https://community.n8n.io/t/help-not-been-able-to-import-external-modules/686/10

Seems like it's messy...

On Tue, Jan 5, 2021, at 2:11 PM, Vadim Bauer wrote:

Don’t know can you do it with n8n?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/8gears/n8n-helm-chart/issues/2#issuecomment-754839621, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD4PP67ZULBD5MUUZ3HGQTSYNP5TANCNFSM4VVKTDSA.

Vad1mo commented 3 years ago

There are a few options:

Side Car Container before n8n start:

  1. Git Checkout
  2. S3 Bucket
  3. Container that contains only the data and copies them on start to runtime.

Traditional Vol:

  1. Volume Mount, question is how to get data in there?

Opt. 3 is the easiest and most versatile. git and s3 have the challenge to add credentials and so on.

Vad1mo commented 3 years ago

@DanTulovsky where you able ro resolve the issue?

DanTulovsky commented 3 years ago

Sorry, I have up on n8n (for other reasons), so I didn't try.

On Tue, Mar 23, 2021, at 12:35 PM, Vadim Bauer wrote:

@DanTulovsky https://github.com/DanTulovsky where you able ro resolve the issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/8gears/n8n-helm-chart/issues/2#issuecomment-805050859, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD4PP35LH5R7JZFGP5KVQ3TFC7OFANCNFSM4VVKTDSA.

rafalkrupinski commented 2 years ago

I created a new image, it's literally 2 lines of code. Just publish it and set it in the config

samuelrade commented 1 month ago

@Vad1mo Is there any option without building a custom image to install external js library? We would need the exif-js module installed.

Vad1mo commented 1 month ago

as @rafalkrupinski mentioned, it is only two lines of code, (I guess if you use the existing n8n as your starting point). We for example, use the existing n8n custom image and run npm install -g @aws-sdk/client-athena &&\ just to add our package.

There are a few other options that come into my mind, (sidecar) but they are all more complicated.

rafalkrupinski commented 1 month ago

Well, it is two line of code (FROM and RUN) but then you have to maintain it to keep it up to date, so not so great. We could do an upgrade script and a template repo (image builder with up-to-date n8n with custom deps) but it would require some tests and I'm not sure how to approach it in this case.

samuelrade commented 1 month ago

Thanks! Those are exactly my concerns. If at all possible, I don't want to have to maintain a custom image. Something like image builder would probably be the most sustainable solution.