Describe the problem/error/question
Hey , I’m trying to create a Dockerfile file to deploy it on AWS but I don’t know where to start.
I’ve an app (Typescript) that I run locally with my own nodes and I’ve to npm link n8n to serve that on my localhost and see my nodes.
How can I do that on a Dockerfile? Is out there an example? Has anyone already made something like that?
Information on your n8n setup
- **n8n version: latest
- **Database (default: SQLite): default
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- **Running n8n via (Docker, npm, n8n cloud, desktop app): npm
- **Operating system: Windows
Welcome to the community
When you say you have an app locally is that n8n or are you embedding n8n as part of your app? Assuming you are just trying to get your node to appear in n8n you could publish it as a community node or if it is private you could build image using something like this…
RUN npm config set -g production false
RUN mkdir /working-dir
COPY . /working-dir
RUN cd /working-dir && npm install && npm run build && npm pack && \
cd /usr/local/lib/node_modules/n8n && npm install /working-dir/*.tgz
RUN rm -rf /working-dir
RUN npm config set -g production true
This is an example I put together a couple of weeks ago on my Baserow Trigger node, You can find the full code and the Dockerfile here: GitHub - Joffcom/n8n-nodes-baserow-trigger: Baserow Trigger node for n8n
Hey @Jon , thanks for your reply!.
When I say I have an app locally I mean that I’m using n8n as part of my app. I use it to be able to see the UI and interact, I would like to deploy that with my nodes. If that makes any sense.
What I do locally is:
npm i & npm run build (inside my repository folder)
npm install n8n -g
npm link (inside my repository folder)
npm link my-nodes in the n8n folder (AppData\Roaming\npm\node_modules\n8n)
n8n start to get the localhost
That way I can get the localhost with the nodes that I made, that’s what I would like to replicate but deploying it on AWS
I guess as it is part of your app it might be worth checking the license side of things to see if it needs an embed license or not.
What you could do is have the same commands that you run locally in your dockerfile and you should be good to go
What you mean by checking the license? What license?
How can I replace this folder path (
npm link my-nodes in the n8n folder (AppData\Roaming\npm\node_modules\n8n)) on docker?
I’m new using docker, sry
Typically adding n8n as part of an application is considered embedding depending on what n8n use used for in the application, while our source is available we are not open source and our license has some terms to it, you can find a bit more here: Faircode license - n8n Documentation
The path probably wouldn’t be appdata in docker it would be whatever the path your container uses for npm packages. You could make the image without the node the use the docker cli to check what the paths should be and work from there.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.