Commit 29cc334d by yiling.shen

add basic database diagnostics after successful deployment

parent 31d697e1
Pipeline #3204 passed with stages
in 1 minute 16 seconds
......@@ -35,6 +35,14 @@ deploy_to_production:
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "/tmp/deploy_with_backup.sh"
- echo "Checking deployment status"
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "cd customer-recall && docker compose ps"
- echo "Basic database check start"
- echo "Check MySQL container logs"
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "cd customer-recall && docker compose logs --tail=5 mysql"
- echo "Check MySQL container environment"
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "cd customer-recall && docker compose exec -T mysql env | grep -i mysql || echo 'Cannot get MySQL environment'"
- echo "Try database connection"
- ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "cd customer-recall && docker compose exec -T mysql mysql -u root -pcallback_system_2024 -e 'SHOW DATABASES;' || echo 'Database connection failed'"
- echo "Basic database check end"
- echo "Deployment completed successfully"
only:
- master
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment