File size: 771 Bytes
4df4140 3cc52ba 4df4140 3cc52ba 4df4140 254f907 4df4140 3cc52ba 21ebc58 3cc52ba 21ebc58 3cc52ba |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
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"]
|