Skip to content

Commit f89cd64

Browse files
fix: Switch to Dockerfile build to resolve cache issues
1 parent 59280a6 commit f89cd64

File tree

3 files changed

+60
-1
lines changed

3 files changed

+60
-1
lines changed

.dockerignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
node_modules
2+
npm-debug.log
3+
.git
4+
.gitignore
5+
.env
6+
.env.local
7+
.DS_Store
8+
*.log
9+
coverage
10+
.nyc_output
11+
.vscode
12+
.idea
13+
dist
14+
build
15+
*.md
16+
.github
17+
.husky
18+
.stackmemory
19+
.claude
20+
claude-auto-triggers
21+
docs
22+
archive
23+
test
24+
tests
25+
__tests__
26+
*.test.*
27+
*.spec.*

Dockerfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Railway Optimized Dockerfile
2+
FROM node:20-slim
3+
4+
# Install dependencies for build
5+
RUN apt-get update && apt-get install -y \
6+
python3 \
7+
make \
8+
g++ \
9+
&& rm -rf /var/lib/apt/lists/*
10+
11+
# Set working directory
12+
WORKDIR /app
13+
14+
# Copy package files
15+
COPY package*.json ./
16+
17+
# Install dependencies with clean cache
18+
RUN npm ci --legacy-peer-deps && \
19+
npm cache clean --force
20+
21+
# Copy source code
22+
COPY . .
23+
24+
# Build the application
25+
RUN npm run build
26+
27+
# Expose port
28+
EXPOSE 3000
29+
30+
# Start the application
31+
CMD ["node", "dist/servers/railway/minimal.js"]

railway.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"$schema": "https://railway.app/railway.schema.json",
33
"build": {
4-
"builder": "NIXPACKS",
4+
"builder": "DOCKERFILE",
5+
"dockerfilePath": "Dockerfile",
56
"watchPatterns": [
67
"src/**",
78
"package.json"

0 commit comments

Comments
 (0)