All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 3m13s
- 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)
23 lines
463 B
Docker
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;"]
|