File size: 797 Bytes
a6b267d
4c1df9d
a6b267d
58d4d89
 
9a4d653
58d4d89
a6b267d
 
dded6be
a6b267d
48d8c79
69aff10
 
 
a6b267d
 
 
 
 
 
 
58d4d89
5fc4fa4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Use the official n8n Docker image as the base image
FROM docker.n8n.io/n8nio/n8n@sha256:9caf109e2293557568ab687b9d6c82646250c8ab7dcb20479c8bef9956811b7a

# Use the secret securely during the build process
RUN --mount=type=secret,id=N8N_AUTH_PASSWORD,mode=0444,required=true \
    export N8N_BASIC_AUTH_PASSWORD=$(cat /run/secrets/N8N_AUTH_PASSWORD)

# Set environment variables for n8n
ENV GENERIC_TIMEZONE="Asia/Dubai" \
    TZ="Asia/Dubai" \
    N8N_BASIC_AUTH_ACTIVE="true" \
    N8N_BASIC_AUTH_USER="admin" \
    N8N_EDITOR_BASE_URL="https://derek-thomas-n8n.hf.space" \
    N8N_HOST="0.0.0.0" \
    N8N_PROTOCOL="https"

# Set the working directory
WORKDIR /data

# Expose port 5678 (default port for n8n)
EXPOSE 5678

# Command to run n8n
ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]