myn / Dockerfile
bonesmasher's picture
Update Dockerfile
b1fd6a3 verified
raw
history blame contribute delete
503 Bytes
# Start from the official n8n image
FROM n8nio/n8n:latest
# Switch to the root user temporarily to gain permissions
USER root
# Create the data directory (if it doesn't exist) and
# change its owner to the 'node' user, which is what n8n runs as.
# The -R flag means "recursively", applying to all sub-folders.
RUN mkdir -p /data/n8n_data && chown -R node:node /data
ENV N8N_TRUST_PROXY=1
ENV DB_POSTGRESDB_SSL=1
# Switch back to the non-root 'node' user for security before running the app
USER node