feat(backend): configure Dockerfile and express server to build and serve mobile app at /mobile on Cloud Run

This commit is contained in:
sumit-plena
2026-07-09 11:41:04 +05:30
parent 1a5028b8f3
commit 9c7c576c99
9 changed files with 540 additions and 22 deletions

View File

@@ -5,12 +5,20 @@ RUN bun install
COPY website/ .
RUN bun run build
FROM oven/bun:1.2.18 AS mobile-builder
WORKDIR /mobile
COPY mobile/package.json ./
RUN bun install
COPY mobile/ .
RUN bun run build:web
FROM oven/bun:1.2.18
WORKDIR /app
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
COPY --from=mobile-builder /mobile/dist ./public/mobile
ENV NODE_ENV=production
ENV PORT=8080