2026-05-22 21:20:56 +00:00
|
|
|
FROM oven/bun:1.3.14 AS builder
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
2026-06-15 03:30:18 +07:00
|
|
|
COPY package.json bun.lock bunfig.toml tsconfig.base.json ./
|
2026-05-22 21:20:56 +00:00
|
|
|
COPY packages/shared/package.json packages/shared/package.json
|
|
|
|
|
COPY apps/web/package.json apps/web/package.json
|
|
|
|
|
COPY apps/api/package.json apps/api/package.json
|
2026-06-15 13:54:55 +07:00
|
|
|
COPY apps/tauri/package.json apps/tauri/package.json
|
2026-06-15 01:06:17 +07:00
|
|
|
RUN bun install
|
2026-05-22 21:20:56 +00:00
|
|
|
|
|
|
|
|
COPY packages/shared packages/shared
|
|
|
|
|
COPY apps/web apps/web
|
2026-05-22 21:53:01 +00:00
|
|
|
ARG VITE_API_BASE_URL
|
|
|
|
|
ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
|
2026-05-22 21:20:56 +00:00
|
|
|
RUN bun run --cwd packages/shared build
|
|
|
|
|
RUN bun run --cwd apps/web build
|
|
|
|
|
|
2026-06-08 00:00:33 +07:00
|
|
|
# =============================================================================
|
|
|
|
|
# Stage 2: nginx (Alpine package — includes sub_filter module)
|
|
|
|
|
# Alpine's nginx package is built with --with-http_sub_module
|
|
|
|
|
# =============================================================================
|
|
|
|
|
FROM alpine:3.20 AS runner
|
|
|
|
|
RUN apk add --no-cache nginx
|
|
|
|
|
|
|
|
|
|
COPY apps/web/nginx.conf /etc/nginx/http.d/default.conf
|
|
|
|
|
COPY --from=builder /app/apps/web/dist /var/lib/nginx/html
|
|
|
|
|
|
2026-05-22 21:20:56 +00:00
|
|
|
EXPOSE 80
|
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|