Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update packages and remove gulp dependecy to fix all warnings. Add initial docker and docker-compose support for development. #40

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
GENERIC_TIMEZONE=UTC
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ These are the basic steps for working with the starter. For detailed guidance on
3. Run `npm i` to install dependencies.
4. Open the project in your editor.
5. Browse the examples in `/nodes` and `/credentials`. Modify the examples, or replace them with your own nodes.
6. Update the `package.json` to match your details.
6. Update the `package.json` to match your details. Also update the `run.sh` with your package (In `package.json` => "name") name.
7. Run `npm run lint` to check for errors or `npm run lintfix` to automatically fix errors when possible.
8. Test your node locally. Refer to [Run your node locally](https://docs.n8n.io/integrations/creating-nodes/test/run-node-locally/) for guidance.
9. Replace this README with documentation for your node. Use the [README_TEMPLATE](README_TEMPLATE.md) to get started.
Expand Down
20 changes: 20 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: "3"

services:
n8n:
image: n8n-custom-nodes
restart: unless-stopped
build:
dockerfile: ./docker/Dockerfile
context: .
ports:
- "5678:5678"
environment:
- GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
- N8N_LOG_LEVEL=debug
volumes:
- n8n-data:/home/node/.n8n

volumes:
n8n-data:
name: n8n-data
21 changes: 21 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM docker.n8n.io/n8nio/n8n:latest AS target

FROM node:18-alpine AS build
RUN npm i npm@latest -g
WORKDIR /build
COPY . .

RUN npm run build

FROM target as final
WORKDIR /custom-nodes

COPY --from=build /build .
COPY --from=build /build/docker/run.sh /run.sh

WORKDIR /custom-nodes
USER root
RUN npm link

USER node
ENTRYPOINT [ "tini", "--", "/run.sh" ]
5 changes: 5 additions & 0 deletions docker/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
mkdir -p ~/.n8n/nodes/
cd ~/.n8n/nodes/
npm link n8n-nodes-<...>
/docker-entrypoint.sh
16 changes: 0 additions & 16 deletions gulpfile.js

This file was deleted.

Loading