- Proper modular structure: src/commands/ + src/lib/ - Autocomplete for /logs and /restart (live container names) - All metrics queries run in parallel (Promise.all) - Multi-stage Docker build (builder + production) - TypeScript type check as CI job before docker build Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
717 B
Docker
22 lines
717 B
Docker
# ── Build stage ──────────────────────────────────────────────────────────────
|
|
FROM node:22-alpine AS builder
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
|
|
COPY tsconfig.json ./
|
|
COPY src/ ./src/
|
|
RUN npm run build
|
|
|
|
# ── Production stage ──────────────────────────────────────────────────────────
|
|
FROM node:22-alpine
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production
|
|
|
|
COPY package*.json ./
|
|
RUN npm ci --omit=dev
|
|
|
|
COPY --from=builder /app/dist ./dist
|
|
|
|
CMD ["node", "dist/index.js"]
|