mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-24 23:56:40 +02:00
PgBouncer in transaction pool mode strips the search_path startup parameter, which Prisma needs for the app_crm schema. CRM now connects directly to PostgreSQL. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
59 lines
2.1 KiB
YAML
59 lines
2.1 KiB
YAML
# ============================================================
|
|
# INSIGHT CRM-Service - Docker Compose Override
|
|
# ============================================================
|
|
# Start: docker compose -f docker-compose.yml -f docker-compose.crm.yml up -d
|
|
# Nur CRM: docker compose -f docker-compose.yml -f docker-compose.crm.yml up -d crm
|
|
|
|
services:
|
|
crm:
|
|
build:
|
|
context: ./packages/crm-service
|
|
dockerfile: Dockerfile
|
|
target: development
|
|
container_name: insight-crm
|
|
restart: unless-stopped
|
|
environment:
|
|
- NODE_ENV=${NODE_ENV:-development}
|
|
- APP_PORT=3100
|
|
# PgBouncer (transaction mode) strips search_path, so CRM uses direct postgres for queries
|
|
- DATABASE_URL=postgresql://${DB_USER:-insight}:${DB_PASSWORD}@postgres:5432/${DB_NAME:-platform_core}?schema=app_crm
|
|
- DATABASE_URL_DIRECT=postgresql://${DB_USER:-insight}:${DB_PASSWORD}@postgres:5432/${DB_NAME:-platform_core}?schema=app_crm
|
|
- REDIS_HOST=redis
|
|
- REDIS_PORT=6379
|
|
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
|
|
- JWT_PUBLIC_KEY_PATH=/app/keys/jwt-public.pem
|
|
- JWT_ISSUER=${JWT_ISSUER:-insight-platform}
|
|
- CORS_ORIGINS=${CORS_ORIGINS:-http://172.20.10.59}
|
|
volumes:
|
|
- ./packages/crm-service:/app
|
|
- /app/node_modules
|
|
- ./.keys/jwt-public.pem:/app/keys/jwt-public.pem:ro
|
|
networks:
|
|
- insight-web
|
|
- insight-db
|
|
- insight-cache
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.crm.rule=PathPrefix(`/api/v1/crm`)"
|
|
- "traefik.http.routers.crm.entrypoints=web"
|
|
- "traefik.http.services.crm.loadbalancer.server.port=3100"
|
|
- "traefik.http.routers.crm.middlewares=cors-headers@file,security-headers@file"
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3100/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 15s
|
|
depends_on:
|
|
pgbouncer:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
|
|
networks:
|
|
insight-web:
|
|
external: true
|
|
insight-db:
|
|
external: true
|
|
insight-cache:
|
|
external: true
|