feat: redesign match play and add broadcast tooling

This commit is contained in:
2026-09-29 02:52:56 +00:00
parent f417a831f7
commit 9b9aafefc1
348 changed files with 31588 additions and 11094 deletions

View File

@@ -1,31 +1,27 @@
FROM oven/bun AS base
FROM oven/bun:1.4.0 AS builder
WORKDIR /app
# Install dependencies (cached unless package.json/bun.lock change)
FROM base AS deps
COPY package.json bun.lock ./
# Patched dependencies are applied during install.
COPY patches ./patches
RUN bun install --frozen-lockfile
# Build (mount cache so SvelteKit reuses previous build artifacts)
FROM base AS build
COPY --from=deps /app/node_modules node_modules
COPY . .
ENV NODE_ENV=production
ENV BETTER_AUTH_SECRET=build-placeholder
RUN --mount=type=cache,target=/app/.svelte-kit bun run build
ENV BETTER_AUTH_SECRET=build-placeholder-at-least-32-characters
ENV ORIGIN=http://localhost:3000
RUN bun --bun x vitest --run
RUN bun run build
# Runtime — prod deps + drizzle-kit for migrations
FROM base AS runtime
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile --production --ignore-scripts && bun add drizzle-kit drizzle-orm --ignore-scripts
COPY --from=build /app/build build
COPY drizzle.config.ts ./
COPY src/lib/server/db/schema.ts src/lib/server/db/auth.schema.ts src/lib/server/db/
USER bun
FROM oven/bun:1.4.0
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/build ./build
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/prod-server.ts ./prod-server.ts
COPY --from=builder /app/src/lib/server/ws-attach.ts ./src/lib/server/ws-attach.ts
COPY --from=builder /app/scripts ./scripts
ENV NODE_ENV=production
ENV PORT=3000
ENV HOST=0.0.0.0
ENV BODY_SIZE_LIMIT=6M
EXPOSE 3000
CMD ["bun", "run", "start"]
CMD ["bun", "prod-server.ts"]