Spaces:
Runtime error
Runtime error
File size: 1,056 Bytes
40a752b a7a1623 06274bb a7a1623 76a8550 06274bb 76a8550 bca6973 06274bb a7a1623 06274bb bca6973 76a8550 bca6973 76a8550 a7a1623 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | FROM n8nio/n8n:latest
USER root
RUN chown -R 1000:1000 /home/node/.n8n
USER node
# HuggingFace Spaces requires port 7860
ENV N8N_PORT=7860
# Fix iframe/cookie issues behind HuggingFace proxy
ENV N8N_SECURE_COOKIE=false
# Database — Supabase PostgreSQL
ENV DB_TYPE=postgresdb
ENV DB_POSTGRESDB_PORT=6543
ENV DB_POSTGRESDB_DATABASE=postgres
ENV DB_POSTGRESDB_SCHEMA=public
# Critical: explicitly tell n8n its public URL and protocol
# Without these, n8n guesses wrong and OAuth state breaks
ENV N8N_HOST=dreosstudio-n8n.hf.space
ENV N8N_PROTOCOL=https
# Critical: trust HuggingFace reverse proxy (fixes X-Forwarded-For + OAuth state)
ENV N8N_PROXY_HOPS=1
# Required settings
ENV N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
ENV EXECUTIONS_MODE=regular
# Secrets — set these in HuggingFace Space Settings → Variables and Secrets:
# DB_POSTGRESDB_HOST
# DB_POSTGRESDB_USER
# DB_POSTGRESDB_PASSWORD
# N8N_ENCRYPTION_KEY
# WEBHOOK_URL = https://dreosstudio-n8n.hf.space/
# N8N_EDITOR_BASE_URL = https://dreosstudio-n8n.hf.space/
CMD ["start"] |