-
Notifications
You must be signed in to change notification settings - Fork 3.2k
docs: Mark native Python as stable #3972
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,10 +8,6 @@ | |
|
|
||
| Task runners are a generic mechanism to execute tasks in a secure and performant way. They're used to execute user-provided JavaScript and Python code in the [Code node](/integrations/builtin/core-nodes/n8n-nodes-base.code/index.md). | ||
|
|
||
| /// note | In beta | ||
| Task runner support for native Python and the `n8nio/runners` image are in beta. Until this feature is stable, you must use the `N8N_NATIVE_PYTHON_RUNNER=true` environment variable to enable the Python runner. | ||
| /// | ||
|
|
||
| This document describes how task runners work and how you can configure them. | ||
|
|
||
| ## How it works | ||
|
|
@@ -79,6 +75,8 @@ | |
| n8n_data: | ||
| ``` | ||
| There are three layers of configuration: the n8n container, the runners container, and the launcher inside the runners container. | ||
| ### Configuring n8n container in external mode | ||
| These are the main environment variables that you can set on the n8n container running in external mode: | ||
|
|
@@ -106,14 +104,19 @@ | |
|
|
||
| ### Configuring launcher in runners container in external mode | ||
|
|
||
| The launcher will read environment variables from runners container environment, and will pass them along to each runner as defined in the [default launcher configuration file](https://github.com/n8n-io/n8n/blob/master/docker/images/runners/n8n-task-runners.json), located in the container at `/etc/task-runners.json`. The default launcher configuration file is locked down, but you will likely want to edit this file, for example, to allowlist first- or third-party modules. To customize the launcher configuration file, mount to this path: | ||
| The launcher will read environment variables from runners container environment, and will... | ||
|
Check warning on line 107 in docs/hosting/configuration/task-runners.md
|
||
|
|
||
| - pass environment variables from the launcher's own environment to all runners (`allowed-env`) | ||
| - set specific environment variables on specific runners (`env-overrides`) | ||
|
|
||
| Which environment variables to pass and to set defined in the [launcher config file](https://github.com/n8n-io/n8n/blob/master/docker/images/runners/n8n-task-runners.json) included in the runners image. This config file is located in the container at `/etc/task-runners.json`. To learn more about the launcher config file, see [here](https://github.com/n8n-io/task-runner-launcher/blob/main/docs/setup.md#config-file). | ||
|
Check failure on line 112 in docs/hosting/configuration/task-runners.md
|
||
ivov marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The default launcher configuration file is locked down, but you will likely want to edit this file, for example, to allowlist first- or third-party modules. To customize the launcher configuration file, mount to this path: | ||
|
Check warning on line 114 in docs/hosting/configuration/task-runners.md
|
||
|
|
||
| ``` | ||
| path/to/n8n-task-runners.json:/etc/n8n-task-runners.json | ||
| ``` | ||
|
|
||
| For further information about the launcher config file, see [here](https://github.com/n8n-io/task-runner-launcher/blob/main/docs/setup.md#config-file). | ||
|
|
||
| ## Adding extra dependencies | ||
|
|
||
| ### 1. Extend the `n8nio/runners` image | ||
|
|
@@ -158,10 +161,6 @@ | |
| * `N8N_RUNNERS_STDLIB_ALLOW`: comma-separated list of allowed Python standard library packages. | ||
| * `N8N_RUNNERS_EXTERNAL_ALLOW`: comma-separated list of allowed Python packages. | ||
|
|
||
| #### Multiple runners and the port for the runner's health check server | ||
|
|
||
| When a single runner is configured, the *"health-check-server-port"* field found in the `n8n-task-runners.json` configuration file is optional and defaults to 5681. When multiple runners are configured, this is required and must be unique per runner. Refer to the launcher’s [config file documentation](https://github.com/n8n-io/task-runner-launcher/blob/main/docs/setup.md#config-file) for the full list of options and examples. | ||
|
|
||
|
Comment on lines
-161
to
-164
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moving this out of here as
Expanded the config file section above. |
||
| ### 2. Build your custom image | ||
|
|
||
| For example, from the n8n repository root: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.