FROM node:22 | |
# Install n8n and jsdom globally | |
RUN npm install -g n8n jsdom | |
# Define volume mounts for persistence | |
VOLUME ["/var/run/docker.sock", "/root/data/home/node/.n8n"] | |
# Set environment variables for n8n | |
ENV N8N_HOST=shayanrl-n8n.hf.space \ | |
N8N_PORT=7860 \ | |
N8N_PROTOCOL=https \ | |
NODE_ENV=production \ | |
WEBHOOK_URL=https://shayanrl-n8n.hf.space \ | |
N8N_USER_FOLDER=/data/shayan/n8n \ | |
NODE_FUNCTION_ALLOW_BUILTIN=* \ | |
NODE_FUNCTION_ALLOW_EXTERNAL=jsdom | |
# Expose the port for n8n | |
EXPOSE 7860 | |
# Command to run n8n | |
CMD ["n8n", "start"] | |