From 255bd8bab8203539999e795d3551dac783c31562 Mon Sep 17 00:00:00 2001 From: sudoooooo Date: Sat, 11 May 2024 01:15:39 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9docker=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 ++-- docker-compose.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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: