Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -1
Dockerfile
CHANGED
|
@@ -1,9 +1,12 @@
|
|
| 1 |
FROM n8nio/n8n:latest
|
| 2 |
|
|
|
|
|
|
|
| 3 |
# Set environment variables
|
| 4 |
ENV N8N_PROTOCOL=https
|
| 5 |
ENV N8N_PORT=7860
|
| 6 |
ENV WEBHOOK_URL=https://YOUR-USERNAME-n8n.hf.space/
|
|
|
|
| 7 |
|
| 8 |
# Use Supabase PostgreSQL
|
| 9 |
ENV DB_TYPE=postgresdb
|
|
@@ -13,6 +16,11 @@ ENV DB_POSTGRESDB_DATABASE=postgres
|
|
| 13 |
ENV DB_POSTGRESDB_USER=postgres
|
| 14 |
ENV DB_POSTGRESDB_PASSWORD=your-password
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
EXPOSE 7860
|
| 17 |
|
| 18 |
-
CMD ["n8n"]
|
|
|
|
| 1 |
FROM n8nio/n8n:latest
|
| 2 |
|
| 3 |
+
USER root
|
| 4 |
+
|
| 5 |
# Set environment variables
|
| 6 |
ENV N8N_PROTOCOL=https
|
| 7 |
ENV N8N_PORT=7860
|
| 8 |
ENV WEBHOOK_URL=https://YOUR-USERNAME-n8n.hf.space/
|
| 9 |
+
ENV N8N_HOST=0.0.0.0
|
| 10 |
|
| 11 |
# Use Supabase PostgreSQL
|
| 12 |
ENV DB_TYPE=postgresdb
|
|
|
|
| 16 |
ENV DB_POSTGRESDB_USER=postgres
|
| 17 |
ENV DB_POSTGRESDB_PASSWORD=your-password
|
| 18 |
|
| 19 |
+
# Ensure proper permissions
|
| 20 |
+
RUN mkdir -p /home/node/.n8n && chown -R node:node /home/node/.n8n
|
| 21 |
+
|
| 22 |
+
USER node
|
| 23 |
+
|
| 24 |
EXPOSE 7860
|
| 25 |
|
| 26 |
+
CMD ["n8n", "start"]
|