22 lines
1015 B
Python
22 lines
1015 B
Python
import paramiko
|
|
import sys
|
|
import io
|
|
|
|
if sys.platform == 'win32':
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')
|
|
|
|
client = paramiko.SSHClient()
|
|
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
client.connect('161.97.93.156', username='carlos', password='Innova1978+*?', timeout=10)
|
|
|
|
print("=== RUNNING DRIPZONE CONTAINERS ===")
|
|
stdin, stdout, stderr = client.exec_command("docker ps -a --filter 'name=bfmno' --format '{{.ID}} | {{.Names}} | {{.Status}} | {{.CreatedAt}}'")
|
|
print(stdout.read().decode('utf-8', errors='replace'))
|
|
|
|
print("=== RECENT COOLIFY APPLICATION DEPLOYMENTS ===")
|
|
# Query coolify database for latest application deployments
|
|
stdin, stdout, stderr = client.exec_command("""docker exec coolify-db psql -U coolify -d coolify -c "SELECT id, application_id, status, created_at, updated_at FROM application_deployments_queue ORDER BY id DESC LIMIT 5;" 2>/dev/null || true""")
|
|
print(stdout.read().decode('utf-8', errors='replace'))
|
|
|
|
client.close()
|