commit a30d97d05cb468c7dac1ab09657edc71a020ca2e Author: stephane.david Date: Sun Jul 19 11:23:19 2026 +0200 First Custom version diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cac9b75 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM n8nio/runners:latest +LABEL authors="stephane.david" +USER root +RUN cd /opt/runners/task-runner-javascript && pnpm add moment uuid +RUN cd /opt/runners/task-runner-python && uv pip install numpy pandas pikepdf +COPY n8n-task-runners.json /etc/n8n-task-runners.json +USER runner diff --git a/imagebuild.sh b/imagebuild.sh new file mode 100644 index 0000000..2de521d --- /dev/null +++ b/imagebuild.sh @@ -0,0 +1,4 @@ +docker build . +docker login gitea.sda.zone +docker tag n8n-runners:custom gitea.sda.zone/stephane.david/n8n-runners:custom +docker push gitea.sda.zone/stephane.david/n8n-runners:custom \ No newline at end of file diff --git a/n8n-task-runners.json b/n8n-task-runners.json new file mode 100644 index 0000000..f5d9928 --- /dev/null +++ b/n8n-task-runners.json @@ -0,0 +1,19 @@ +{ + "task-runners": [ + { + "runner-type": "javascript", + "env-overrides": { + "NODE_FUNCTION_ALLOW_BUILTIN": "crypto", + "NODE_FUNCTION_ALLOW_EXTERNAL": "moment,uuid" + } + }, + { + "runner-type": "python", + "env-overrides": { + "PYTHONPATH": "/opt/runners/task-runner-python", + "N8N_RUNNERS_STDLIB_ALLOW": "json", + "N8N_RUNNERS_EXTERNAL_ALLOW": "numpy,pandas,pikepdf,io" + } + } + ] +} \ No newline at end of file