n8n / Dockerfile
Chris4K's picture
Update Dockerfile
07a8bf8 verified
raw
history blame contribute delete
420 Bytes
FROM node:20-slim
# system deps
RUN apt-get update && apt-get install -y \
curl \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# n8n
RUN npm install -g n8n
# persistent data directory
ENV N8N_USER_FOLDER=/data/.n8n
RUN mkdir -p /data/.n8n
# required for HF Spaces
ENV N8N_HOST=0.0.0.0
ENV N8N_PORT=7860
ENV N8N_PROTOCOL=http
ENV WEBHOOK_URL=http://localhost:7860/
EXPOSE 7860
CMD ["n8n"]