feat: 修改docker配置
This commit is contained in:
parent
6771b831e5
commit
255bd8bab8
@ -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/
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user