fix(deploy): align .env.docker.example and prestart.sh with docker-compose.yaml

This commit is contained in:
Agent Zero
2026-08-06 23:53:18 +02:00
parent c78d9a5c7f
commit 5ac6fb36de
2 changed files with 21 additions and 26 deletions
+4 -4
View File
@@ -3,15 +3,15 @@
# prestart.sh — Container entrypoint for CRM API container
#
# Responsibilities:
# 1. Run Alembic DB migrations (alembic upgrade head) using the owner user.
# 2. Set the crm_runtime password (for RLS-enforced app access).
# 1. Run Alembic DB migrations (alembic upgrade head) using the migration user.
# 2. Set passwords for all application DB roles (crm_api, crm_auth, crm_worker, crm_migration).
# 3. Start uvicorn as PID 1 (so signals like SIGTERM are forwarded correctly).
#
# Notes:
# - `set -e` ensures the container crashes loudly if migrations fail.
# - The ARQ worker runs in a separate container (see worker.sh / docker-compose).
# - Migrations use MIGRATION_DATABASE_URL (crm_migration, NOSUPERUSER, BYPASSRLS).
# - The app uses DATABASE_URL (crm_runtime, NOSUPERUSER, NOBYPASSRLS).
# - Migrations use MIGRATION_DATABASE_URL (crm_user for bootstrap, then crm_migration).
# - The app uses DATABASE_URL (crm_api, NOSUPERUSER, NOBYPASSRLS).
# =============================================================================
set -e