FROM node:20-bullseye-slim # Install curl RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* # Install n8n RUN npm install -g n8n@2.3.5 # Install a simple static server for root RUN npm install -g http-server # Expose the n8n UI port EXPOSE 7860 # Environment variables ENV N8N_PORT=7860 ENV N8N_HOST=0.0.0.0 ENV NODE_ENV=production # Start both: http-server for / and n8n CMD bash -c "http-server -p 7860 --silent & n8n start --tunnel --host=0.0.0.0 --port=7860"