fix: service names with underscores (crm_app, crm_worker) + docker_compose_domains with crm_app
This commit is contained in:
+7
-13
@@ -1,11 +1,3 @@
|
|||||||
# =============================================================================
|
|
||||||
# docker-compose.yml — LeoCRM Multi-Container Setup
|
|
||||||
#
|
|
||||||
# Full stack: PostgreSQL + Redis + App + Worker, all with persistent volumes.
|
|
||||||
# Coolify manages networking, labels, and domains — no custom networks or labels.
|
|
||||||
# No hardcoded secrets, UUIDs, or domains — everything from environment.
|
|
||||||
# =============================================================================
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: pgvector/pgvector:pg16
|
image: pgvector/pgvector:pg16
|
||||||
@@ -36,7 +28,7 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
|
||||||
crm-app:
|
crm_app:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@@ -66,6 +58,8 @@ services:
|
|||||||
SMTP_FROM: ${SMTP_FROM:-no-reply@localhost}
|
SMTP_FROM: ${SMTP_FROM:-no-reply@localhost}
|
||||||
SMTP_TLS: ${SMTP_TLS:-true}
|
SMTP_TLS: ${SMTP_TLS:-true}
|
||||||
BCRYPT_ROUNDS: ${BCRYPT_ROUNDS:-12}
|
BCRYPT_ROUNDS: ${BCRYPT_ROUNDS:-12}
|
||||||
|
ADMIN_EMAIL: ${ADMIN_EMAIL:-admin@media-on.de}
|
||||||
|
ADMIN_PASSWORD: ${ADMIN_PASSWORD:-Admin123!}
|
||||||
volumes:
|
volumes:
|
||||||
- storage:/data/storage
|
- storage:/data/storage
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -73,9 +67,9 @@ services:
|
|||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 30s
|
start_period: 60s
|
||||||
|
|
||||||
crm-worker:
|
crm_worker:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
@@ -85,7 +79,7 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
redis:
|
redis:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
crm-app:
|
crm_app:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
entrypoint: ["/app/worker.sh"]
|
entrypoint: ["/app/worker.sh"]
|
||||||
environment:
|
environment:
|
||||||
@@ -112,7 +106,7 @@ services:
|
|||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
start_period: 30s
|
start_period: 60s
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pgdata: {}
|
pgdata: {}
|
||||||
|
|||||||
+18
-2
@@ -1180,8 +1180,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 (Magic ENV SERVICE_FQDN_CRM_APP_8000 handles domain)
|
# 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": f"{APP_DOMAIN}:443"}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
timeout=30,
|
||||||
|
)
|
||||||
|
print(f" Domain set: {APP_DOMAIN}:443 ({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",
|
||||||
|
|||||||
Reference in New Issue
Block a user