add: 自动部署上线脚本
This commit is contained in:
1 parent
3ad5f0915b
commit
b26bee6f05
2 files changed
+11
-1
No files matched your search
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 上线脚本
|
||||
app_ver="v1.02"
|
||||
|
||||
bun run build-linux-x86
|
||||
scp -P $server_port Dockerfile ${server_user}@${server_host}:${server_user_path}
|
||||
scp -P $server_port build/test-api-linux-x86 ${server_user}@${server_host}:${server_user_path}/app
|
||||
ssh -p $server_port root@${server_host} "cd ${server_user_path} && docker build -t test-api:${app_ver} . && docker compose down && docker compose up -d"
|
||||
ssh -p $server_port ${server_user}@${server_host} "cd ${server_user_path}/ && rm -rf Dockerfile app"
|
||||
Reference in new issue
Block a user