Spaces:
Running
Running
# Use the official n8n Docker image as the base image | |
FROM docker.n8n.io/n8nio/n8n:latest | |
# 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" | |
# Set the working directory | |
WORKDIR /data | |
# Expose port 5678 (default port for n8n) | |
EXPOSE 5678 | |
# Command to run n8n | |
ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"] |