fix(frontend): serve precompressed web assets
Deployment Config CI / Deployment Config (push) Successful in 10s
Frontend CI / Frontend (push) Has been cancelled

This commit is contained in:
2026-05-01 01:12:13 +08:00
parent 873c0382e4
commit 052299e54f
4 changed files with 20 additions and 4 deletions
+7 -2
View File
@@ -25,9 +25,14 @@ ARG VITE_API_BASE_URL=/api
RUN pnpm --filter admin-web build
# ─── Stage 2: Serve with nginx ─────────────────────────────────────────────────
FROM nginx:1.27-alpine
FROM alpine:3.22
RUN apk add --no-cache nginx nginx-mod-http-brotli \
&& mkdir -p /run/nginx /usr/share/nginx/html
COPY --from=builder /app/apps/admin-web/dist /usr/share/nginx/html
COPY apps/admin-web/nginx.conf /etc/nginx/conf.d/default.conf
COPY apps/admin-web/nginx.conf /etc/nginx/http.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]