Add missing discord-api-types dependency and fix Docker build: - Add discord-api-types to dependencies - Fix Dockerfile (npm ci without --omit=dev for build stage) Co-Authored-By: Claude <noreply@anthropic.com>
28 lines
438 B
Docker
28 lines
438 B
Docker
# Build stage
|
|
FROM node:22-alpine AS builder
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# Production stage
|
|
FROM node:22-alpine
|
|
WORKDIR /app
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
COPY package*.json ./
|
|
RUN npm ci --omit=dev && npm cache clean --force
|
|
|
|
COPY --from=builder /app/dist ./dist
|
|
|
|
# Set non-root user
|
|
RUN addgroup -g 1001 -S nodejs && \
|
|
adduser -S nodejs -u 1001
|
|
USER nodejs
|
|
|
|
CMD ["node", "dist/index.js"]
|