deploy.sh 466 B

12345678910111213
  1. #!/bin/bash
  2. # 执行 webpack 打包
  3. webpack --mode production
  4. # 上传到服务器
  5. scp -r ../__dist/pmr-api-gateway/index.js root@112.124.10.239:/home/pmr/pmr-api-gateway
  6. scp -r ../__dist/pmr-api-gateway/proxy.json root@112.124.10.239:/home/pmr/proxy.json
  7. scp -r ../__dist/pmr-api-gateway/config.json root@112.124.10.239:/home/pmr/config.json
  8. # 重启 Docker
  9. ssh root@112.124.10.239 "docker restart pmr-api-gateway && docker logs pmr-api-gateway --tail 100 -ft"