video-shuoshan/web/Dockerfile
zyc f42eb64e25
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 3m13s
Add CI/CD pipeline and K8S deployment
- Backend/Web Dockerfiles with multi-stage builds
- K8S deployments, services, and ingress for both domains
- Gitea Actions workflow: build → push to SWR → deploy to K3s
- Health check endpoint (/healthz/)
- CORS env var support for production domains
- Nginx reverse proxy for frontend → backend API

Domains:
  - video-huoshan-api.airlabs.art (backend)
  - video-huoshan-web.airlabs.art (frontend)
2026-03-13 10:24:31 +08:00

23 lines
463 B
Docker

# ---- Build Stage ----
FROM node:18-alpine AS builder
RUN npm config set registry https://registry.npmmirror.com
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# ---- Runtime Stage ----
FROM nginx:alpine
RUN sed -i 's#dl-cdn.alpinelinux.org#mirrors.aliyun.com#g' /etc/apk/repositories
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]