mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
feat: Add Dockerfile for Railway deployment
- Create optimized Dockerfile for n8n enterprise unlocked - Use Node.js 20 Alpine for smaller image size - Install pnpm and build all packages - Configure production environment variables - Expose port 5678 for Railway deployment
This commit is contained in:
42
Dockerfile
Normal file
42
Dockerfile
Normal file
@@ -0,0 +1,42 @@
|
||||
# Dockerfile for n8n Enterprise Unlocked
|
||||
FROM node:20-alpine
|
||||
|
||||
# Install pnpm
|
||||
RUN npm install -g pnpm@latest
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./
|
||||
COPY packages/cli/package.json ./packages/cli/
|
||||
|
||||
# Copy all package.json files for proper dependency resolution
|
||||
COPY packages/@n8n/*/package.json ./packages/@n8n/*/
|
||||
COPY packages/frontend/*/package.json ./packages/frontend/*/
|
||||
COPY packages/core/package.json ./packages/core/
|
||||
COPY packages/workflow/package.json ./packages/workflow/
|
||||
COPY packages/nodes-base/package.json ./packages/nodes-base/
|
||||
COPY packages/node-dev/package.json ./packages/node-dev/
|
||||
COPY packages/testing/package.json ./packages/testing/
|
||||
COPY packages/extensions/*/package.json ./packages/extensions/*/
|
||||
|
||||
# Install dependencies
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
# Build the application
|
||||
RUN pnpm build
|
||||
|
||||
# Expose port
|
||||
EXPOSE 5678
|
||||
|
||||
# Set environment variables
|
||||
ENV N8N_HOST=0.0.0.0
|
||||
ENV N8N_PORT=5678
|
||||
ENV NODE_ENV=production
|
||||
|
||||
# Start n8n
|
||||
CMD ["pnpm", "--filter=n8n", "start"]
|
||||
Reference in New Issue
Block a user