ci: wire dokploy deploy triggers #no_deploy
All checks were successful
CI/CD Pipeline / Manual Action Help (push) Has been skipped
CI/CD Pipeline / Start Dev Containers in Dokploy (push) Has been skipped
CI/CD Pipeline / Cleanup Dev Database (push) Has been skipped
CI/CD Pipeline / Quality Gate (push) Successful in 1m47s
CI/CD Pipeline / Build and Push Images (push) Successful in 2m49s
CI/CD Pipeline / Deploy Dev in Dokploy (push) Has been skipped
CI/CD Pipeline / Internal Notify (push) Successful in 1s

This commit is contained in:
2026-04-28 13:18:06 +02:00
parent 6a9e96922c
commit 4aa552341f
3 changed files with 207 additions and 39 deletions

View File

@@ -39,8 +39,22 @@ def _check_db(timeout_seconds: int) -> tuple[bool, str]:
try:
conn = psycopg2.connect(**params)
with conn.cursor() as cursor:
cursor.execute("SELECT 1")
cursor.fetchone()
cursor.execute(
"""
SELECT pg_encoding_to_char(encoding)
FROM pg_database
WHERE datname = current_database()
"""
)
row = cursor.fetchone()
encoding = row[0] if row else None
if encoding != "UTF8":
return (
False,
f"{params['host']}:{params['port']}/{params['dbname']} "
f"(database encoding is {encoding or 'unknown'}, expected UTF8; "
"recreate the database with ENCODING 'UTF8')",
)
return True, "OK"
except Exception as exc: # noqa: BLE001
target = f"{params['host']}:{params['port']}/{params['dbname']}"