init: 初始化 AssetX 项目仓库
包含 webapp(Next.js 用户端)、webapp-back(Go 后端)、 antdesign(管理后台)、landingpage(营销落地页)、 数据库 SQL 和配置文件。
This commit is contained in:
21
webapp/Dockerfile
Normal file
21
webapp/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
# ---- 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 . .
|
||||
ARG BACKEND_URL=http://backend:8080
|
||||
ENV BACKEND_URL=$BACKEND_URL
|
||||
RUN npm run build
|
||||
|
||||
# ---- Run stage ----
|
||||
FROM node:20-alpine AS runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
COPY --from=builder /app/public ./public
|
||||
EXPOSE 3010
|
||||
ENV BACKEND_URL=http://backend:8080
|
||||
CMD ["node", "server.js"]
|
||||
Reference in New Issue
Block a user