fix: migrate deployment from Hetzner to Coolify (#1)
All checks were successful
CI/CD / go-lint (push) Has been skipped
CI/CD / python-lint (push) Has been skipped
CI/CD / nodejs-lint (push) Has been skipped
CI/CD / test-go-ai-compliance (push) Successful in 34s
CI/CD / test-python-backend-compliance (push) Successful in 39s
CI/CD / test-python-document-crawler (push) Successful in 24s
CI/CD / test-python-dsms-gateway (push) Successful in 19s
CI/CD / validate-canonical-controls (push) Successful in 13s
CI/CD / Deploy (push) Successful in 2s
All checks were successful
CI/CD / go-lint (push) Has been skipped
CI/CD / python-lint (push) Has been skipped
CI/CD / nodejs-lint (push) Has been skipped
CI/CD / test-go-ai-compliance (push) Successful in 34s
CI/CD / test-python-backend-compliance (push) Successful in 39s
CI/CD / test-python-document-crawler (push) Successful in 24s
CI/CD / test-python-dsms-gateway (push) Successful in 19s
CI/CD / validate-canonical-controls (push) Successful in 13s
CI/CD / Deploy (push) Successful in 2s
## Summary - Add Coolify deployment configuration (docker-compose, healthchecks, network setup) - Replace deploy-hetzner CI job with Coolify webhook deploy - Externalize postgres, qdrant, S3 for Coolify environment ## All changes since branch creation - Coolify docker-compose with Traefik labels and healthchecks - CI pipeline: deploy-hetzner → deploy-coolify (simple webhook curl) - SQLAlchemy 2.x text() compatibility fixes - Alpine-compatible Dockerfile fixes Co-authored-by: Sharang Parnerkar <parnerkarsharang@gmail.com> Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
@@ -15,6 +15,7 @@ from typing import Any, Optional
|
||||
|
||||
from fastapi import APIRouter, HTTPException, Header
|
||||
from pydantic import BaseModel
|
||||
from sqlalchemy import text
|
||||
|
||||
from database import SessionLocal
|
||||
|
||||
@@ -75,13 +76,13 @@ async def get_compliance_scope(
|
||||
db = SessionLocal()
|
||||
try:
|
||||
row = db.execute(
|
||||
"""SELECT tenant_id,
|
||||
text("""SELECT tenant_id,
|
||||
state->'compliance_scope' AS scope,
|
||||
created_at,
|
||||
updated_at
|
||||
FROM sdk_states
|
||||
WHERE tenant_id = :tid
|
||||
AND state ? 'compliance_scope'""",
|
||||
AND state ? 'compliance_scope'"""),
|
||||
{"tid": tid},
|
||||
).fetchone()
|
||||
|
||||
@@ -106,22 +107,22 @@ async def upsert_compliance_scope(
|
||||
db = SessionLocal()
|
||||
try:
|
||||
db.execute(
|
||||
"""INSERT INTO sdk_states (tenant_id, state)
|
||||
text("""INSERT INTO sdk_states (tenant_id, state)
|
||||
VALUES (:tid, jsonb_build_object('compliance_scope', :scope::jsonb))
|
||||
ON CONFLICT (tenant_id) DO UPDATE
|
||||
SET state = sdk_states.state || jsonb_build_object('compliance_scope', :scope::jsonb),
|
||||
updated_at = NOW()""",
|
||||
updated_at = NOW()"""),
|
||||
{"tid": tid, "scope": scope_json},
|
||||
)
|
||||
db.commit()
|
||||
|
||||
row = db.execute(
|
||||
"""SELECT tenant_id,
|
||||
text("""SELECT tenant_id,
|
||||
state->'compliance_scope' AS scope,
|
||||
created_at,
|
||||
updated_at
|
||||
FROM sdk_states
|
||||
WHERE tenant_id = :tid""",
|
||||
WHERE tenant_id = :tid"""),
|
||||
{"tid": tid},
|
||||
).fetchone()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user