I’m using the latest version of n8n, v1.88.0, and I’m trying to adapt my workflows to use the task runner.
I’m using the default task runner configuration by just setting this environment variable:
N8N_RUNNERS_ENABLED=true
The problem is that the custom NPM package I use requires me to set some environment variables when it starts up. Everything was working normally, however, in this “sandbox” environment created by n8n, apparently the environment variables are not passed, which is a problem for me.
FROM docker.n8n.io/n8nio/n8n:next AS base
USER root
# Add Kraken API environment variables
ARG KRAKEN_API_KEY=""
ENV KRAKEN_API_KEY=$KRAKEN_API_KEY
ARG KRAKEN_API_SECRET=""
ENV KRAKEN_API_SECRET=$KRAKEN_API_SECRET
RUN npm install -g remeda querystring axios ccxt ts-kraken
USER node
# Create .env file
RUN echo "KRAKEN_API_KEY=${KRAKEN_API_KEY}" > /home/node/.env
RUN echo "KRAKEN_API_SECRET=${KRAKEN_API_SECRET}" >> /home/node/.env