feat: 新增docker部署脚本

This commit is contained in:
irving
2025-09-07 17:21:47 -04:00
parent 4bc5b67937
commit ffcb5eae20

16
deploy-docker.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
# Docker deployment script
set -e
# Get current time and format it
current_time=$(date +"%Y-%m-%d %H:%M:%S")
echo "Deployment started at: $current_time"
echo "Connecting to server to update docker container..."
# SSH into the server, pull the latest image and restart the container
ssh root@122.51.20.105 "source /etc/profile; cd ~; docker compose pull && docker compose up -d"
echo "Docker container updated!"
# Get current time and format it
current_time=$(date +"%Y-%m-%d %H:%M:%S")
echo "Deployment finished at: $current_time"