File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ node_modules
2+ .next
3+ .git
4+ .gitignore
5+ README.md
6+ coverage
7+ .env
8+ .env. *
Original file line number Diff line number Diff line change 3636 - name : Test
3737 run : npm test
3838
39+ - name : Build Docker Image
40+ run : docker build -t playwithalgorithms .
41+
3942 - name : Build
4043 run : npm run build
Original file line number Diff line number Diff line change 1+ # Build stage (builder)
2+ FROM node:22-alpine AS builder
3+
4+ # Set working directory
5+ WORKDIR /app
6+
7+ # Copy package files first (for caching)
8+ COPY package*.json ./
9+
10+ # Install all dependencies
11+ RUN npm ci
12+
13+ # Copy rest of the code
14+ COPY . .
15+
16+ # Build Next.js app
17+ RUN npm run build
18+
19+ # Runtime stage
20+ FROM node:22-alpine AS runner
21+
22+ WORKDIR /app
23+
24+ # Copy only required files from builder
25+ COPY --from=builder /app/package*.json ./
26+ COPY --from=builder /app/node_modules ./node_modules
27+ COPY --from=builder /app/.next ./.next
28+ COPY --from=builder /app/public ./public
29+
30+ # Expose app port
31+ EXPOSE 3000
32+
33+ # Start app
34+ CMD ["npm" , "run" , "start" ]
Original file line number Diff line number Diff line change 1+ version : " 3.9"
2+
3+ services :
4+ app :
5+ image : playwithalgorithms
6+ container_name : playwithalgorithms
7+ ports :
8+ - " 3000:3000"
9+
You can’t perform that action at this time.
0 commit comments