feat(backend): configure Dockerfile and express server to build and serve mobile app at /mobile on Cloud Run
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user