backend: add static serving + multi-stage Dockerfile, website: add API test dashboard
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
FROM oven/bun:1.2.18 AS base
|
||||
FROM oven/bun:1.2.18 AS website-builder
|
||||
WORKDIR /website
|
||||
COPY website/package.json ./
|
||||
RUN bun install
|
||||
COPY website/ .
|
||||
RUN bun run build
|
||||
|
||||
FROM oven/bun:1.2.18
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json bun.lock tsconfig.json ./
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
COPY src ./src
|
||||
COPY backend/package.json backend/bun.lock backend/tsconfig.json ./
|
||||
RUN bun install --frozen-lockfile --production
|
||||
COPY backend/src ./src
|
||||
COPY --from=website-builder /website/dist ./public
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=8080
|
||||
|
||||
Reference in New Issue
Block a user