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
38 lines
1.1 KiB
Docker
38 lines
1.1 KiB
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/api/package.json ./apps/api/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/api ./apps/api
|
|
COPY database ./database
|
|
|
|
RUN npm run build -w @saas/shared && npm exec -- tsc -p apps/api/tsconfig.json
|
|
|
|
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/api/package.json ./apps/api/package.json
|
|
COPY apps/api/scripts ./apps/api/scripts
|
|
COPY --from=builder /workspace/packages/shared/dist ./packages/shared/dist
|
|
COPY --from=builder /workspace/apps/api/dist ./apps/api/dist
|
|
COPY database ./database
|
|
|
|
CMD ["sh", "-c", "npm run migrate -w @saas/api && npm run start -w @saas/api"]
|