This commit is contained in:
2025-12-24 11:02:02 -08:00
parent 35dd4650ad
commit bb38247324

View File

@@ -1,26 +1,19 @@
FROM n8nio/runners:latest
USER root
RUN cd /opt/runners/task-runner-python && uv pip install numpy pandas
RUN cat >/n8n-task-runners.json <<EOL
RUN cd /opt/runners/task-runner-python && uv pip install fantraxapi
RUN cat >/etc/n8n-task-runners.json <<EOL
{
"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",
"env-overrides": {
"PYTHONPATH": "/opt/runners/task-runner-python",
"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
COPY n8n-task-runners.json /etc/n8n-task-runners.json
USER runner