File tree Expand file tree Collapse file tree 5 files changed +46
-1
lines changed Expand file tree Collapse file tree 5 files changed +46
-1
lines changed Original file line number Diff line number Diff line change
1
+ GENERIC_TIMEZONE = UTC
Original file line number Diff line number Diff line change
1
+ FROM docker.n8n.io/n8nio/n8n:latest AS target
2
+
3
+ FROM node:19-alpine AS build
4
+ RUN npm i npm@latest -g
5
+ WORKDIR /build
6
+ COPY . .
7
+
8
+ RUN npm run build
9
+
10
+ FROM target as final
11
+ WORKDIR /custom-nodes
12
+
13
+ COPY --from=build /build .
14
+ COPY --from=build /build/run.sh /run.sh
15
+
16
+ WORKDIR /custom-nodes
17
+ USER root
18
+ RUN npm link
19
+
20
+ USER node
21
+ ENTRYPOINT [ "tini" , "--" , "/run.sh" ]
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ These are the basic steps for working with the starter. For detailed guidance on
31
31
3. Run `npm i` to install dependencies.
32
32
4. Open the project in your editor.
33
33
5. Browse the examples in `/nodes` and `/credentials`. Modify the examples, or replace them with your own nodes.
34
- 6. Update the `package.json` to match your details.
34
+ 6. Update the `package.json` to match your details. Also update the `run.sh` with your package (In `package.json` => "name") name.
35
35
7. Run `npm run lint` to check for errors or `npm run lintfix` to automatically fix errors when possible.
36
36
8. Test your node locally. Refer to [Run your node locally](https://docs.n8n.io/integrations/creating-nodes/test/run-node-locally/) for guidance.
37
37
9. Replace this README with documentation for your node. Use the [README_TEMPLATE](README_TEMPLATE.md) to get started.
Original file line number Diff line number Diff line change
1
+ version : " 3"
2
+
3
+ services :
4
+ n8n :
5
+ image : n8n-custom-nodes
6
+ restart : unless-stopped
7
+ build : .
8
+ ports :
9
+ - " 5678:5678"
10
+ environment :
11
+ - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
12
+ - N8N_LOG_LEVEL=debug
13
+ volumes :
14
+ - n8n-data:/home/node/.n8n
15
+
16
+ volumes :
17
+ n8n-data :
18
+ name : n8n-data
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ mkdir -p ~ /.n8n/nodes/
3
+ cd ~ /.n8n/nodes/
4
+ npm link n8n-nodes-< ...>
5
+ /docker-entrypoint.sh
You can’t perform that action at this time.
0 commit comments