forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.app
More file actions
42 lines (26 loc) · 855 Bytes
/
Copy pathDockerfile.app
File metadata and controls
42 lines (26 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Dockerfile for the Vite + React frontend
FROM node:22-alpine AS base
FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json package-lock.json ./
COPY apps/app/package.json ./apps/app/
COPY apps/agent/package.json ./apps/agent/
COPY apps/bff/package.json ./apps/bff/
RUN npm ci --ignore-scripts
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build --workspace @repo/app
FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 appuser
COPY --from=builder --chown=appuser:nodejs /app/apps/app/dist ./apps/app/dist
COPY --from=builder --chown=appuser:nodejs /app/apps/app/server.mjs ./apps/app/server.mjs
USER appuser
EXPOSE 3000
ENV PORT=3000
CMD ["node", "apps/app/server.mjs"]