docs: align all installation docs with docker-compose.yaml

This commit is contained in:
Agent Zero
2026-08-07 00:03:31 +02:00
parent 5ac6fb36de
commit e9f990b039
6 changed files with 38 additions and 55 deletions
+18 -18
View File
@@ -86,7 +86,7 @@ Der erste Alembic-Lauf auf einer leeren Datenbank MUSS als `crm_user` ausgeführ
weil `crm_migration` erst durch Migration 0085 erstellt wird.
```
MIGRATION_DATABASE_URL=postgresql+asyncpg://crm_user:<PASSWORT>@db:5432/crm_db
MIGRATION_DATABASE_URL=postgresql+asyncpg://crm_user:<PASSWORT>@postgres:5432/crm_db
```
Nach Migration 0085 kann MIGRATION_DATABASE_URL auf `crm_migration` umgestellt werden,
@@ -100,10 +100,10 @@ Nach Migration 0085 kann MIGRATION_DATABASE_URL auf `crm_migration` umgestellt w
| Variable | Wert | Beschreibung |
|----------|------|-------------|
| DATABASE_URL | postgresql+asyncpg://crm_api:PW@db:5432/crm_db | API-Abfragen (crm_api) |
| AUTH_DATABASE_URL | postgresql+asyncpg://crm_auth:PW@db:5432/crm_db | Login/Auth (crm_auth) |
| WORKER_DATABASE_URL | postgresql+asyncpg://crm_worker:PW@db:5432/crm_db | Worker-Jobs (crm_worker) |
| MIGRATION_DATABASE_URL | postgresql+asyncpg://crm_user:PW@db:5432/crm_db | Migrationen (crm_user für Bootstrap) |
| DATABASE_URL | postgresql+asyncpg://crm_api:PW@postgres:5432/crm_db | API-Abfragen (crm_api) |
| AUTH_DATABASE_URL | postgresql+asyncpg://crm_auth:PW@postgres:5432/crm_db | Login/Auth (crm_auth) |
| WORKER_DATABASE_URL | postgresql+asyncpg://crm_worker:PW@postgres:5432/crm_db | Worker-Jobs (crm_worker) |
| MIGRATION_DATABASE_URL | postgresql+asyncpg://crm_user:PW@postgres:5432/crm_db | Migrationen (crm_user für Bootstrap) |
| REDIS_URL | redis://default:PW@redis:6379/0 | Redis-Verbindung |
| SECRET_KEY | <mindestens 32 Zeichen> | Session-Verschlüsselung |
| ENVIRONMENT | production | Umgebung |
@@ -117,9 +117,9 @@ Nach Migration 0085 kann MIGRATION_DATABASE_URL auf `crm_migration` umgestellt w
| Variable | Wert | Beschreibung |
|----------|------|-------------|
| DATABASE_URL | postgresql+asyncpg://crm_worker:PW@db:5432/crm_db | Worker-DB (crm_worker) |
| WORKER_DATABASE_URL | postgresql+asyncpg://crm_worker:PW@db:5432/crm_db | Worker-DB (crm_worker) |
| MIGRATION_DATABASE_URL | postgresql+asyncpg://crm_user:PW@db:5432/crm_db | Plugin-Migrationen (crm_user) |
| DATABASE_URL | postgresql+asyncpg://crm_worker:PW@postgres:5432/crm_db | Worker-DB (crm_worker) |
| WORKER_DATABASE_URL | postgresql+asyncpg://crm_worker:PW@postgres:5432/crm_db | Worker-DB (crm_worker) |
| MIGRATION_DATABASE_URL | postgresql+asyncpg://crm_user:PW@postgres:5432/crm_db | Plugin-Migrationen (crm_user) |
| REDIS_URL | redis://default:PW@redis:6379/0 | Redis-Verbindung |
| SECRET_KEY | <mindestens 32 Zeichen> | Session-Verschlüsselung |
| ENVIRONMENT | production | Umgebung |
@@ -152,7 +152,7 @@ dasselbe Passwort verwenden wie `MIGRATION_DATABASE_URL`.
version: '3.8'
services:
db:
postgres:
image: pgvector/pgvector:pg16
restart: unless-stopped
environment:
@@ -180,10 +180,10 @@ services:
expose:
- '8000'
environment:
DATABASE_URL: postgresql+asyncpg://crm_api:${DB_PASSWORD}@db:5432/crm_db
AUTH_DATABASE_URL: postgresql+asyncpg://crm_auth:${DB_PASSWORD}@db:5432/crm_db
WORKER_DATABASE_URL: postgresql+asyncpg://crm_worker:${DB_PASSWORD}@db:5432/crm_db
MIGRATION_DATABASE_URL: postgresql+asyncpg://crm_user:${DB_PASSWORD}@db:5432/crm_db
DATABASE_URL: postgresql+asyncpg://crm_api:${DB_PASSWORD}@postgres:5432/crm_db
AUTH_DATABASE_URL: postgresql+asyncpg://crm_auth:${DB_PASSWORD}@postgres:5432/crm_db
WORKER_DATABASE_URL: postgresql+asyncpg://crm_worker:${DB_PASSWORD}@postgres:5432/crm_db
MIGRATION_DATABASE_URL: postgresql+asyncpg://crm_user:${DB_PASSWORD}@postgres:5432/crm_db
REDIS_URL: redis://default:${REDIS_PASSWORD}@redis:6379/0
SECRET_KEY: ${SECRET_KEY}
ENVIRONMENT: production
@@ -195,7 +195,7 @@ services:
volumes:
- api-storage:/data/storage
depends_on:
db:
postgres:
condition: service_healthy
redis:
condition: service_started
@@ -211,15 +211,15 @@ services:
restart: unless-stopped
entrypoint: /app/worker.sh
environment:
DATABASE_URL: postgresql+asyncpg://crm_worker:${DB_PASSWORD}@db:5432/crm_db
WORKER_DATABASE_URL: postgresql+asyncpg://crm_worker:${DB_PASSWORD}@db:5432/crm_db
MIGRATION_DATABASE_URL: postgresql+asyncpg://crm_user:${DB_PASSWORD}@db:5432/crm_db
DATABASE_URL: postgresql+asyncpg://crm_worker:${DB_PASSWORD}@postgres:5432/crm_db
WORKER_DATABASE_URL: postgresql+asyncpg://crm_worker:${DB_PASSWORD}@postgres:5432/crm_db
MIGRATION_DATABASE_URL: postgresql+asyncpg://crm_user:${DB_PASSWORD}@postgres:5432/crm_db
REDIS_URL: redis://default:${REDIS_PASSWORD}@redis:6379/0
SECRET_KEY: ${SECRET_KEY}
ENVIRONMENT: production
STORAGE_PATH: /data/storage
depends_on:
db:
postgres:
condition: service_healthy
redis:
condition: service_started
+7 -9
View File
@@ -3,19 +3,18 @@
## Coolify Deployment
### Application Info
- **Coolify App UUID:** `dx4pqdziu4uj6x9fxs1u5z0x`
- **App ID:** 12
- **Coolify App UUID:** `xf7smknlger3hvkrsb910tui`
- **Domain:** `https://crm.media-on.de`
- **Git Repo:** `https://forgejo.media-on.de/Leopoldadmin/leocrm.git`
- **Branch:** `main`
- **Build Pack:** Dockerfile (Multi-Stage: Frontend + Backend)
- **Build Pack:** docker-compose
- **Health Check:** `GET /api/v1/health` → 200
### Deploy Process
1. **Code pushen:** `git push origin main`
2. **Coolify Deploy triggern:**
- Option A: Coolify Dashboard → `https://server.media-on.de` → App → Deploy
- Option B: API: `POST https://server.media-on.de/api/v1/deploy` mit `{"uuid": "dx4pqdziu4uj6x9fxs1u5z0x"}`
- Option B: API: `POST https://server.media-on.de/api/v1/deploy` mit `{"uuid": "xf7smknlger3hvkrsb910tui"}`
3. **Build dauert ~2-5 Min** (Multi-Stage: npm install + vite build + pip install + runtime)
4. **Container wird automatisch ausgetauscht** wenn Build erfolgreich
@@ -25,12 +24,11 @@ Wenn Coolify den Build nicht ausführt:
ssh root@46.225.91.159
cd /tmp && git clone https://Leopoldadmin:<token>@forgejo.media-on.de/Leopoldadmin/leocrm.git leocrm-build
cd leocrm-build
docker build -t dx4pqdziu4uj6x9fxs1u5z0x:<commit-hash> .
cd /data/coolify/applications/dx4pqdziu4uj6x9fxs1u5z0x
docker build -t xf7smknlger3hvkrsb910tui:<commit-hash> .
cd /data/coolify/applications/xf7smknlger3hvkrsb910tui
# docker-compose.yaml Image-Tag aktualisieren
# .env SOURCE_COMMIT aktualisieren
docker compose up -d
docker stop <old-container> && docker rm <old-container>
```
### Bekannte Probleme
@@ -50,5 +48,5 @@ docker stop <old-container> && docker rm <old-container>
- **SSH Key:** `/a0/usr/workdir/.ssh/coolify-01-root`
- **Coolify API Token:** Set via `COOLIFY_API_TOKEN` environment variable
- **Coolify Dashboard:** `https://server.media-on.de`
- **PostgreSQL:** `crm-postgres` container (pgvector/pgvector:pg16)
- **Redis:** `crm-redis` container
- **PostgreSQL:** `postgres` container (pgvector/pgvector:pg16)
- **Redis:** `redis` container