fix: RLS seeding, FQDN 422, stale migration hash, mail_accounts.password_salt
- Use migration engine (crm_migration, BYPASSRLS) for default data seeding in app/main.py instead of crm_api role which is RLS-enforced - Skip domains PATCH for dockercompose apps in deploy_api() to avoid 422 - Regenerate migration_hashes.txt for 0085_restore_tenant_rls.py - Add migration 0110: password_salt column to mail_accounts
This commit is contained in:
+16
-4
@@ -307,13 +307,25 @@ def ssh_run(cmd: str, timeout: int = 60) -> tuple[int, str]:
|
||||
def deploy_api(client: CoolifyClient, app_uuid: str, skip_build: bool = False) -> StepResult:
|
||||
"""Deploy or restart the application via Coolify API.
|
||||
Uses /api/v1/deploy which works for both dockerfile and dockercompose build packs."""
|
||||
# Set FQDN via PATCH
|
||||
# Set FQDN via PATCH — only for non-dockercompose apps.
|
||||
# dockercompose apps use docker_compose_domains, not domains.
|
||||
# PATCHing domains on a dockercompose app returns 422.
|
||||
if APP_DOMAIN:
|
||||
print(f" Setting FQDN to {APP_DOMAIN}...")
|
||||
try:
|
||||
client.update_application(app_uuid, domains=APP_DOMAIN)
|
||||
app_info = client.get_application(app_uuid)
|
||||
build_pack = app_info.get("build_pack", "")
|
||||
except Exception as e:
|
||||
print(f" Warning: could not set FQDN: {e}")
|
||||
print(f" Warning: could not fetch app info to check build_pack: {e}")
|
||||
build_pack = ""
|
||||
|
||||
if build_pack == "dockercompose":
|
||||
print(f" Skipping FQDN PATCH (dockercompose app — domain set via docker_compose_domains)")
|
||||
else:
|
||||
print(f" Setting FQDN to {APP_DOMAIN}...")
|
||||
try:
|
||||
client.update_application(app_uuid, domains=APP_DOMAIN)
|
||||
except Exception as e:
|
||||
print(f" Warning: could not set FQDN: {e}")
|
||||
|
||||
print(" Triggering Coolify deploy via /api/v1/deploy...")
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user