tcptemplate/deploy.bat

13 lines
623 B
Batchfile

del go-tcpFramework-rudy
SET CGO_ENABLED=0
SET GOOS=linux
SET GOARCH=amd64
go build
scp -i ./id_rsa Dockerfile ubuntu@118.24.238.198:/home/ubuntu/api/bin/Dockerfile
ssh -t -i ./id_rsa ubuntu@118.24.238.198 'rm /home/ubuntu/api/bin/rudy'
ssh -t -i ./id_rsa ubuntu@118.24.238.198 'cp /home/ubuntu/api/bin/go-tcpFramework-rudy /home/ubuntu/api/bin/rudy'
ssh -t -i ./id_rsa root@118.24.238.198 'cd /home/ubuntu/api/bin/;docker build ./ -t "caiyuzheng\rudy"'
ssh -t -i ./id_rsa ubuntu@118.24.238.198 'chmod 777 /home/ubuntu/api/bin/rudy'
ssh -t -i ./id_rsa ubuntu@118.24.238.198 '/home/ubuntu/api/bin/restart.sh rudy'