File size: 1,159 Bytes
d680316
 
 
 
 
 
 
 
 
 
4c4621a
 
d680316
4c4621a
 
38906ce
4c4621a
 
 
d680316
 
 
 
4c4621a
 
 
 
 
 
 
 
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
# Use an official n8n image.
# You can pin to a specific version for stability, e.g., n8nio/n8n:1.44.1
FROM n8nio/n8n:latest

# Set environment variables for n8n
ENV N8N_HOST="0.0.0.0"
ENV N8N_PORT=7860
ENV GENERIC_TIMEZONE="UTC"
# ENV N8N_DIAGNOSTICS_ENABLED=false

# Tell n8n to automatically enforce correct permissions for its settings file
ENV N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true

# Create a working directory (good practice, though n8n uses /home/node/.n8n for data)
WORKDIR /app

# Copy the startup script into the container and set its permissions.
# Using an absolute path for the destination is a bit more robust.
COPY --chmod=0755 start.sh /app/start.sh

# Expose the port. Hugging Face Spaces will use this port based on the README.md app_port metadata.
EXPOSE 7860

# Set our start.sh script as the entrypoint.
# This script is responsible for setting up necessary environment variables
# and then executing the main n8n process.
ENTRYPOINT ["/app/start.sh"]

# CMD is not strictly needed here if start.sh takes no arguments,
# or you can leave it as CMD [] if you prefer.
# The base n8n image's CMD would be overridden by this ENTRYPOINT.