first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
# n8n - Task runners (`n8nio/runners`) - (PREVIEW)
|
||||
|
||||
`n8nio/runners` image includes [JavaScript runner](https://github.com/n8n-io/n8n/tree/master/packages/%40n8n/task-runner),
|
||||
[Python runner](https://github.com/n8n-io/n8n/tree/master/packages/%40n8n/task-runner-python) and
|
||||
[Task runner launcher](https://github.com/n8n-io/task-runner-launcher) that connects to a Task Broker
|
||||
running on the main n8n instance when running in `external` mode. This image is to be launched as a sidecar
|
||||
container to the main n8n container.
|
||||
|
||||
[Task runners](https://docs.n8n.io/hosting/configuration/task-runners/) are used to execute user-provided code
|
||||
in the [Code Node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/), isolated from the n8n instance.
|
||||
|
||||
For official documentation, please see [here](https://docs.n8n.io/hosting/configuration/task-runners/).
|
||||
|
||||
For a distroless variant of this image, see [here](./Dockerfile.distroless).
|
||||
|
||||
For development purposes only, see below.
|
||||
|
||||
## Testing locally
|
||||
|
||||
### 1) Make a production build of n8n
|
||||
|
||||
```
|
||||
pnpm run build:n8n
|
||||
```
|
||||
|
||||
### 2) Build the task runners image
|
||||
|
||||
```
|
||||
docker buildx build \
|
||||
-f docker/images/runners/Dockerfile \
|
||||
-t n8nio/runners \
|
||||
.
|
||||
```
|
||||
|
||||
### 3) Start n8n on your host machine with Task Broker enabled
|
||||
|
||||
```
|
||||
N8N_RUNNERS_MODE=external \
|
||||
N8N_RUNNERS_AUTH_TOKEN=test \
|
||||
N8N_LOG_LEVEL=debug \
|
||||
pnpm start
|
||||
```
|
||||
|
||||
### 4) Start the task runner container
|
||||
|
||||
```
|
||||
docker run --rm -it \
|
||||
-e N8N_RUNNERS_AUTH_TOKEN=test \
|
||||
-e N8N_RUNNERS_LAUNCHER_LOG_LEVEL=debug \
|
||||
-e N8N_RUNNERS_TASK_BROKER_URI=http://host.docker.internal:5679 \
|
||||
-p 5680:5680 \
|
||||
n8nio/runners
|
||||
```
|
||||
|
||||
If you need to add extra dependencies (custom image), follow [these instructions](https://docs.n8n.io/hosting/configuration/task-runners/#adding-extra-dependencies).
|
||||
|
||||
Reference in New Issue
Block a user