Skip to content

Commit 5ee6513

Browse files
pktikkaniclaude
andcommitted
Switch to Dockerfile for Railway deployment
Nixpacks doesn't support Node 22.12+ required by Prisma 7.1.0. Using Dockerfile with node:24-alpine for precise version control. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 3a38abb commit 5ee6513

3 files changed

Lines changed: 28 additions & 4 deletions

File tree

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM node:24-alpine
2+
3+
WORKDIR /app
4+
5+
# Copy package files
6+
COPY package*.json ./
7+
COPY prisma ./prisma/
8+
9+
# Install dependencies
10+
RUN npm ci
11+
12+
# Copy source code
13+
COPY . .
14+
15+
# Build
16+
RUN npm run build
17+
18+
# Expose port
19+
EXPOSE 3000
20+
21+
# Start
22+
CMD ["npm", "run", "start"]

nixpacks.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
[variables]
2+
NIXPACKS_NODE_VERSION = "22"
3+
14
[phases.setup]
2-
nixPkgs = ["nodejs"]
5+
nixPkgs = ["nodejs@22"]
36

47
[phases.install]
58
cmds = ["npm ci"]

railway.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
22
"$schema": "https://railway.app/railway.schema.json",
33
"build": {
4-
"builder": "NIXPACKS",
5-
"buildCommand": "npm ci && npm run build",
6-
"nixpacksConfigPath": "nixpacks.toml"
4+
"builder": "DOCKERFILE",
5+
"dockerfilePath": "Dockerfile"
76
},
87
"deploy": {
98
"startCommand": "npm run start",

0 commit comments

Comments
 (0)