fix: docker_compose_domains + worker depends_on crm-app healthy

This commit is contained in:
Agent Zero
2026-08-05 22:18:12 +02:00
parent c278597757
commit 2d25dc35e0
2 changed files with 20 additions and 2 deletions
+2
View File
@@ -84,6 +84,8 @@ services:
condition: service_healthy condition: service_healthy
redis: redis:
condition: service_healthy condition: service_healthy
crm-app:
condition: service_healthy
entrypoint: ["/app/worker.sh"] entrypoint: ["/app/worker.sh"]
environment: environment:
DATABASE_URL: ${WORKER_DATABASE_URL:-postgresql+asyncpg://crm_worker:${DB_PASSWORD}@postgres:5432/${POSTGRES_DB:-crm_db}} DATABASE_URL: ${WORKER_DATABASE_URL:-postgresql+asyncpg://crm_worker:${DB_PASSWORD}@postgres:5432/${POSTGRES_DB:-crm_db}}
+18 -2
View File
@@ -1179,8 +1179,24 @@ def deploy_initial() -> int:
steps.append(("Set envs", StepResult(False, str(e)))) steps.append(("Set envs", StepResult(False, str(e))))
_print_result(steps[-1][1]) _print_result(steps[-1][1])
# Step 4: Deploy via /api/v1/deploy (works for dockercompose build_pack) # Step 4: Set domain via docker_compose_domains + Deploy
print("\n[4/4] Deploying docker-compose stack...") print("\n[4/4] Setting domain and deploying...")
if APP_DOMAIN:
try:
resp = httpx.patch(
f"{client.base_url}/api/v1/applications/{app_uuid}",
headers=client.headers,
json={
"docker_compose_domains": [
{"name": "crm-app", "domain": APP_DOMAIN}
]
},
timeout=30,
)
print(f" Domain set: {APP_DOMAIN} ({resp.status_code})")
except Exception as e:
print(f" Warning: could not set domain: {e}")
try: try:
resp = httpx.post( resp = httpx.post(
f"{client.base_url}/api/v1/deploy", f"{client.base_url}/api/v1/deploy",