Skip to content

Commit c8469dc

Browse files
committed
chore: add Dockerfile for containerized deployment
1 parent 3ca4d56 commit c8469dc

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Dockerfile for PaciPort
2+
FROM node:20-alpine AS base
3+
4+
# Install dependencies
5+
FROM base AS deps
6+
WORKDIR /app
7+
COPY package.json package-lock.json ./
8+
RUN npm ci --production=false
9+
10+
# Build
11+
FROM base AS builder
12+
WORKDIR /app
13+
COPY --from=deps /app/node_modules ./node_modules
14+
COPY . .
15+
RUN npm run build
16+
17+
# Production
18+
FROM base AS runner
19+
WORKDIR /app
20+
ENV NODE_ENV=production
21+
COPY --from=builder /app/.next/standalone ./
22+
COPY --from=builder /app/.next/static ./.next/static
23+
COPY --from=builder /app/public ./public
24+
25+
EXPOSE 3000
26+
CMD ["node", "server.js"]

0 commit comments

Comments
 (0)