sanmu
authored
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# 启动服务
pnpm install
pnpm dev
# 部署到39服务器
1. 在根目录执行 sh deploy/dev.sh
2. 登录39服务器,进入到 /root/web/canrud-outside-nuxt-front 目录
3. 在39服务器,依次执行以下命令
```
docker load -i canrud-outside-front_dev.tar
docker run -d -p 8088:3000 --name canrud-outside-front canrud-outside-front:dev
```
# 生产部署
|
sanmu
authored
|
15
16
17
|
生产环境部署一定要更新tag,这样有问题可以快速回滚。
1. 修改 deploy/prod.sh的 TAG 将版本号+1,默认改动小版本,如1.0.0->1.0.1
|
sanmu
authored
|
18
|
1. 在根目录执行 sh deploy/prod.sh
|
sanmu
authored
|
19
|
1. 登录112服务器,,将镜像拷贝到生产的47服务器
|
sanmu
authored
|
20
|
scp /root/web/canrud-outside-nuxt-front/canrud-outside-front_1.0.6.tar root@47.89.254.121:/root/web/canrud-outside-nuxt-front
|
sanmu
authored
|
21
|
1. 登录47服务器,进入到 /root/web/canrud-outside-nuxt-front 目录
|
sanmu
authored
|
22
|
1. 加载镜像 docker load -i canrud-outside-front_1.0.6.tar (1.0.0对应你的tag)
|
sanmu
authored
|
23
24
25
|
1. 修改 docker-compose.yaml 的镜像版本号
1. 启动服务 docker-compose up -d
|
sanmu
authored
|
26
|
|