Skip to content

Commit 05cd2d2

Browse files
GeneAIGeneAI
authored andcommitted
fix: Switch to Dockerfile for Railway deployment
1 parent 6056b2c commit 05cd2d2

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

website/Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Use Node.js 20 as base image
2+
FROM node:20-slim
3+
4+
WORKDIR /app
5+
6+
# Copy package files
7+
COPY package.json package-lock.json* ./
8+
9+
# Install dependencies
10+
RUN npm ci --legacy-peer-deps
11+
12+
# Copy application files
13+
COPY . .
14+
15+
# Build the Next.js application (using Railway-specific build)
16+
RUN npm run build:railway
17+
18+
# Expose port
19+
EXPOSE 8080
20+
21+
ENV PORT=8080
22+
ENV NODE_ENV=production
23+
24+
# Start the application
25+
CMD ["npm", "run", "start"]

website/nixpacks.toml

Lines changed: 0 additions & 5 deletions
This file was deleted.

website/railway.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
[build]
2-
builder = "NIXPACKS"
3-
buildCommand = "npm run build:railway"
2+
builder = "DOCKERFILE"
3+
dockerfilePath = "website/Dockerfile"
44

55
[deploy]
6-
startCommand = "npm run start"
76
restartPolicyType = "ON_FAILURE"
87
restartPolicyMaxRetries = 10

0 commit comments

Comments
 (0)