-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (28 loc) · 1021 Bytes
/
Dockerfile
File metadata and controls
34 lines (28 loc) · 1021 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
# Stage 1: Build frontend + server
FROM node:22-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json setup.mjs ./
RUN npm ci
COPY . .
RUN npm run build
# Stage 2: Production
FROM node:22-alpine
RUN apk add --no-cache tini wget
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/dist-server ./dist-server
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/server.mjs ./server.mjs
COPY --from=builder /app/agent-runtime.mjs ./agent-runtime.mjs
COPY --from=builder /app/bin ./bin
COPY --from=builder /app/setup.mjs ./setup.mjs
COPY --from=builder /app/assets ./assets
COPY --from=builder /app/drizzle ./drizzle
RUN mkdir -p /app/state
VOLUME /app/state
EXPOSE 4173
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:4173/api/health || exit 1
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["node", "bin/office.mjs", "--no-open"]