包含 webapp(Next.js 用户端)、webapp-back(Go 后端)、 antdesign(管理后台)、landingpage(营销落地页)、 数据库 SQL 和配置文件。
16 lines
428 B
Docker
16 lines
428 B
Docker
# ---- Build stage ----
|
|
FROM node:20-alpine AS builder
|
|
WORKDIR /app
|
|
RUN apk add --no-cache python3 make g++
|
|
COPY package.json package-lock.json* yarn.lock* pnpm-lock.yaml* ./
|
|
RUN npm ci --legacy-peer-deps
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# ---- Run stage (nginx) ----
|
|
FROM nginx:alpine
|
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
EXPOSE 10502
|
|
CMD ["nginx", "-g", "daemon off;"]
|