n8n.io / Dockerfile
Heuehneje's picture
Upload 2 files
3cc52ba verified
raw
history blame contribute delete
771 Bytes
FROM node:18.17.0-alpine
# Install PostgreSQL client and dependencies
RUN apk add --no-cache postgresql-client python3 py3-pip
# Create app directory
WORKDIR /usr/src/app
# Install n8n
RUN npm install -g n8n
# Install pyngrok
RUN pip3 install pyngrok
# Expose the default n8n port
EXPOSE 5678
# Set environment variables for database
ENV DB_TYPE=postgresdb
ENV DB_POSTGRESDB_DATABASE=n8n
ENV DB_POSTGRESDB_HOST=postgres
ENV DB_POSTGRESDB_PORT=5432
ENV DB_POSTGRESDB_USER=n8n
ENV DB_POSTGRESDB_PASSWORD=n8n_password
# Set ngrok auth token
ENV NGROK_AUTH_TOKEN="2jxZvrHacdbj09XoGdETb9TDjuu_4S4KHwtFYw4jhNPuymvR7"
# Set the entrypoint to start n8n and ngrok
COPY start.sh /usr/src/app/start.sh
RUN chmod +x /usr/src/app/start.sh
ENTRYPOINT ["/usr/src/app/start.sh"]