feat: 修改docker配置

This commit is contained in:
sudoooooo 2024-05-11 01:15:39 +08:00
parent 6771b831e5
commit 255bd8bab8
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
# 镜像集成 # 镜像集成
FROM node:16 FROM node:18-slim
# 设置工作区间 # 设置工作区间
WORKDIR /xiaoju-survey WORKDIR /xiaoju-survey
@ -10,7 +10,7 @@ COPY . /xiaoju-survey
RUN npm config set registry https://registry.npmjs.org/ 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启动 # 用了后端服务代理启动建议使用nginx启动
RUN cd /xiaoju-survey && cp -af ./web/dist/* ./server/public/ RUN cd /xiaoju-survey && cp -af ./web/dist/* ./server/public/

View File

@ -15,7 +15,7 @@ services:
- xiaoju-survey - xiaoju-survey
xiaoju-survey: xiaoju-survey:
image: "xiaojusurvey/xiaoju-survey:1.0.4" image: "xiaojusurvey/xiaoju-survey:1.1.0-slim"
container_name: xiaoju-survey container_name: xiaoju-survey
restart: always restart: always
ports: ports: