diff --git a/Dockerfile b/Dockerfile index 7a0bffee..11381b79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # 镜像集成 -FROM node:16 +FROM node:18-slim # 设置工作区间 WORKDIR /xiaoju-survey @@ -10,7 +10,7 @@ COPY . /xiaoju-survey RUN npm config set registry https://registry.npmjs.org/ # 安装项目依赖 -RUN cd /xiaoju-survey/web && npm install && npm run build +RUN cd /xiaoju-survey/web && npm install && npm run build-only # 用了后端服务代理启动,建议使用nginx启动 RUN cd /xiaoju-survey && cp -af ./web/dist/* ./server/public/ diff --git a/docker-compose.yaml b/docker-compose.yaml index 24c159b7..71a8cbdc 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -15,7 +15,7 @@ services: - xiaoju-survey xiaoju-survey: - image: "xiaojusurvey/xiaoju-survey:1.0.4" + image: "xiaojusurvey/xiaoju-survey:1.1.0-slim" container_name: xiaoju-survey restart: always ports: