Sign in

Administrator / spring-boot-microservices-onlineshooping-fullstack · Files

Logo

GitLab

  • Back to dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • spring-boot-microservices-onlineshooping-fullstack
  • frontend
  • Dockerfile
  • modified the code
    9a06167d
    Administrator authored
    2025-10-26 19:40:29 +0800  
    Browse Code »
Dockerfile 346 Bytes
Edit Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# Build stage
FROM node:18-alpine as build

WORKDIR /app

COPY package*.json ./
RUN npm ci

COPY . .
RUN npm run build

# Production stage
FROM nginx:alpine

# 复制构建文件
COPY --from=build /app/dist /usr/share/nginx/html

# 🟢 复制本地 nginx.conf
COPY nginx.conf /etc/nginx/nginx.conf

EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]