Create Dockerfile
Browse files- Dockerfile +29 -0
Dockerfile
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use an official n8n image.
|
| 2 |
+
# You can pin to a specific version for stability, e.g., n8nio/n8n:1.44.1
|
| 3 |
+
FROM n8nio/n8n:latest
|
| 4 |
+
|
| 5 |
+
# Set environment variables for n8n
|
| 6 |
+
# N8N_HOST tells n8n to bind to all available network interfaces within the container.
|
| 7 |
+
ENV N8N_HOST="0.0.0.0"
|
| 8 |
+
# N8N_PORT tells n8n which port to listen on. Hugging Face Spaces requires 7860.
|
| 9 |
+
ENV N8N_PORT=7860
|
| 10 |
+
# Optional: Set your timezone. Replace "UTC" with your desired timezone, e.g., "Europe/Berlin".
|
| 11 |
+
# A list of tz database time zones can be found here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
| 12 |
+
ENV GENERIC_TIMEZONE="UTC"
|
| 13 |
+
# Disable telemetry if you prefer
|
| 14 |
+
# ENV N8N_DIAGNOSTICS_ENABLED=false
|
| 15 |
+
|
| 16 |
+
# Create a working directory
|
| 17 |
+
WORKDIR /app
|
| 18 |
+
|
| 19 |
+
# Copy the startup script into the container
|
| 20 |
+
COPY start.sh .
|
| 21 |
+
# Make the startup script executable
|
| 22 |
+
RUN chmod +x ./start.sh
|
| 23 |
+
|
| 24 |
+
# Expose the port. Hugging Face Spaces will use this port based on the README.md app_port metadata.
|
| 25 |
+
EXPOSE 7860
|
| 26 |
+
|
| 27 |
+
# Set the startup script as the command to run when the container starts.
|
| 28 |
+
# This script will configure WEBHOOK_URL using SPACE_HOST and then execute n8n.
|
| 29 |
+
CMD ["./start.sh"]
|