-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (27 loc) · 715 Bytes
/
Copy pathDockerfile
File metadata and controls
38 lines (27 loc) · 715 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
# Build stage
FROM node:20-alpine AS build
WORKDIR /app
# Install dependencies
COPY package.json package-lock.json ./
RUN npm ci
# Copy source code
COPY . .
# Build application
RUN npm run build
# Runtime stage
FROM node:20-alpine AS runtime
WORKDIR /app
# Install runtime dependencies
COPY --from=build /app/package.json ./
RUN npm ci --production
# Copy built application
COPY --from=build /app/dist ./dist
COPY --from=build /app/skills ./skills
COPY --from=build /app/docs ./docs
# Expose port
EXPOSE 8081
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD wget -q -O- http://localhost:8081/health || exit 1
# Start application
CMD ["node", "dist/index.js"]