File size: 514 Bytes
82353aa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Use the official Node.js image as the base
FROM node:18-alpine

# Install n8n globally using npm
RUN npm install -g n8n

# Create a directory for n8n data and set full permissions
RUN mkdir -p /home/node/.n8n && chmod 777 /home/node/.n8n

# Set Environment Variables for Security and Port
ENV N8N_BASIC_AUTH_ACTIVE=true
ENV N8N_BASIC_AUTH_USER=aditya
ENV N8N_BASIC_AUTH_PASSWORD=YourSecretPassword
ENV N8N_PORT=7860

# Expose the default Hugging Face port
EXPOSE 7860

# Command to start n8n
CMD ["n8n", "start"]