mirror of
https://github.com/arthur-pbty/flint.git
synced 2026-08-01 20:29:03 +02:00
- add Discord OAuth2 authentication - allow users to register their bots via token - implement dynamic bot start/stop system - store bots in database (multi-tenant) - replace single-bot env setup with scalable architecture
35 lines
969 B
Docker
35 lines
969 B
Docker
FROM node:20-alpine AS deps
|
|
|
|
WORKDIR /workspace
|
|
|
|
COPY package.json package-lock.json tsconfig.base.json ./
|
|
COPY packages/shared/package.json ./packages/shared/package.json
|
|
COPY apps/bot/package.json ./apps/bot/package.json
|
|
|
|
RUN npm ci
|
|
|
|
FROM node:20-alpine AS builder
|
|
|
|
WORKDIR /workspace
|
|
|
|
COPY --from=deps /workspace/node_modules ./node_modules
|
|
COPY package.json package-lock.json tsconfig.base.json ./
|
|
COPY packages/shared ./packages/shared
|
|
COPY apps/bot ./apps/bot
|
|
|
|
RUN npm run build -w @saas/bot
|
|
|
|
FROM node:20-alpine AS runner
|
|
|
|
WORKDIR /workspace
|
|
ENV NODE_ENV=production
|
|
|
|
COPY --from=deps /workspace/node_modules ./node_modules
|
|
COPY package.json package-lock.json ./
|
|
COPY packages/shared/package.json ./packages/shared/package.json
|
|
COPY apps/bot/package.json ./apps/bot/package.json
|
|
COPY --from=builder /workspace/packages/shared/dist ./packages/shared/dist
|
|
COPY --from=builder /workspace/apps/bot/dist ./apps/bot/dist
|
|
|
|
CMD ["npm", "run", "start", "-w", "@saas/bot"]
|