diff --git a/docker-compose.yaml b/docker-compose.yaml index 8ac1c54..afeeea4 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -84,6 +84,8 @@ services: condition: service_healthy redis: condition: service_healthy + crm-app: + condition: service_healthy entrypoint: ["/app/worker.sh"] environment: DATABASE_URL: ${WORKER_DATABASE_URL:-postgresql+asyncpg://crm_worker:${DB_PASSWORD}@postgres:5432/${POSTGRES_DB:-crm_db}} diff --git a/scripts/deploy.py b/scripts/deploy.py index 7625fe4..8c1bae8 100644 --- a/scripts/deploy.py +++ b/scripts/deploy.py @@ -1179,8 +1179,24 @@ def deploy_initial() -> int: steps.append(("Set envs", StepResult(False, str(e)))) _print_result(steps[-1][1]) - # Step 4: Deploy via /api/v1/deploy (works for dockercompose build_pack) - print("\n[4/4] Deploying docker-compose stack...") + # Step 4: Set domain via docker_compose_domains + Deploy + 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: resp = httpx.post( f"{client.base_url}/api/v1/deploy",