discord-bot/Dockerfile
rainofdestiny 3ac39d03ce
Some checks failed
CI/CD / typecheck (push) Failing after 46s
CI/CD / docker (push) Has been skipped
CI/CD / deploy (push) Has been skipped
refactor: rewrite in TypeScript (discord.js v14)
- 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>
2026-03-26 05:42:51 +07:00

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"]