updated
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -1,26 +1,19 @@
|
|||||||
FROM n8nio/runners:latest
|
FROM n8nio/runners:latest
|
||||||
USER root
|
USER root
|
||||||
RUN cd /opt/runners/task-runner-python && uv pip install numpy pandas
|
RUN cd /opt/runners/task-runner-python && uv pip install fantraxapi
|
||||||
RUN cat >/n8n-task-runners.json <<EOL
|
RUN cat >/etc/n8n-task-runners.json <<EOL
|
||||||
{
|
{
|
||||||
"task-runners": [
|
"task-runners": [
|
||||||
{
|
|
||||||
"runner-type": "javascript",
|
|
||||||
"env-overrides": {
|
|
||||||
"NODE_FUNCTION_ALLOW_BUILTIN": "crypto", // <-- allowlist Node.js builtin modules here
|
|
||||||
"NODE_FUNCTION_ALLOW_EXTERNAL": "moment,uuid", // <-- allowlist third-party JS packages here
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"runner-type": "python",
|
"runner-type": "python",
|
||||||
"env-overrides": {
|
"env-overrides": {
|
||||||
"PYTHONPATH": "/opt/runners/task-runner-python",
|
"PYTHONPATH": "/opt/runners/task-runner-python",
|
||||||
"N8N_RUNNERS_STDLIB_ALLOW": "json", // <-- allowlist Python standard library packages here
|
"N8N_RUNNERS_STDLIB_ALLOW": "json", // <-- allowlist Python standard library packages here
|
||||||
"N8N_RUNNERS_EXTERNAL_ALLOW": "numpy,pandas" // <-- allowlist third-party Python packages here
|
"N8N_RUNNERS_EXTERNAL_ALLOW": "fantraxapi" // <-- allowlist third-party Python packages here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
EOL
|
EOL
|
||||||
COPY n8n-task-runners.json /etc/n8n-task-runners.json
|
|
||||||
USER runner
|
USER runner
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user