$script = @"
#!/bin/bash
docker exec coolify-db psql -U coolify -d coolify -t -c "SELECT logs FROM application_deployments WHERE application_id = (SELECT id FROM applications WHERE uuid='eosgwscc4g044c884k0ws4gc') ORDER BY created_at DESC LIMIT 1;" > /tmp/out.txt
"@
Set-Content "c:\dev\run.sh" -Value $script -Encoding ASCII
ssh redbull "cat > /tmp/run.sh" < c:\dev\run.sh
ssh redbull "chmod +x /tmp/run.sh && /tmp/run.sh && cat /tmp/out.txt"
