Fix: Remove hardcoded UUIDs and secrets from deploy scripts
- deploy.py: UUIDs from env vars or Coolify API lookup by name - fast-deploy.sh: No hardcoded UUIDs, APP_DOMAIN from env - docker-compose.yml: All secrets from env vars, no hardcoded values - .env.example: All required vars documented - Deleted obsolete fast-frontend-deploy.sh with hardcoded container name
This commit is contained in:
+109
-44
@@ -1,48 +1,94 @@
|
||||
# LeoCRM v1.0 - Environment Variables Template
|
||||
# LeoCRM - Environment Variables Template
|
||||
# Copy to .env and fill in real values.
|
||||
|
||||
# === REQUIRED ===
|
||||
DATABASE_URL=postgresql+asyncpg://crm_api:your_password@localhost:5432/crm_db
|
||||
AUTH_DATABASE_URL=postgresql+asyncpg://crm_auth:your_password@localhost:5432/crm_db
|
||||
WORKER_DATABASE_URL=postgresql+asyncpg://crm_worker:your_password@localhost:5432/crm_db
|
||||
MIGRATION_DATABASE_URL=postgresql+asyncpg://crm_migration:your_password@localhost:5432/crm_db
|
||||
REDIS_URL=redis://localhost:6379/0
|
||||
# === COOLIFY DEPLOYMENT (required for scripts/deploy.py) ===
|
||||
# Coolify API token (required for deploy)
|
||||
COOLIFY_API_TOKEN=
|
||||
# Coolify base URL
|
||||
COOLIFY_BASE_URL=https://server.media-on.de
|
||||
# Application UUID (optional — resolved via API lookup by APP_NAME if absent)
|
||||
COOLIFY_APP_UUID=
|
||||
# Worker Service UUID (optional — resolved via API lookup by WORKER_NAME if absent)
|
||||
COOLIFY_WORKER_UUID=
|
||||
# Application name for API lookup
|
||||
APP_NAME=leocrm-api
|
||||
# Worker name for API lookup
|
||||
WORKER_NAME=leocrm-worker
|
||||
# App domain (required for deploy, used for health check and FQDN)
|
||||
APP_DOMAIN=https://crm.media-on.de
|
||||
|
||||
# === REQUIRED for Docker/Production ===
|
||||
# Redis password (required in Docker)
|
||||
REDIS_PASSWORD=your_redis_password
|
||||
# === COOLIFY INITIAL DEPLOY (only needed for --initial) ===
|
||||
# Coolify project UUID
|
||||
COOLIFY_PROJECT_UUID=
|
||||
# Coolify server UUID
|
||||
COOLIFY_SERVER_UUID=
|
||||
# Coolify private key UUID (for Git deploy key)
|
||||
COOLIFY_PRIVATE_KEY_UUID=
|
||||
# Coolify environment name
|
||||
COOLIFY_ENVIRONMENT=production
|
||||
|
||||
# === OPTIONAL (with defaults) ===
|
||||
# === DATABASE (required) ===
|
||||
# Single password for all DB roles (crm_user, crm_api, crm_auth, crm_worker, crm_migration)
|
||||
DB_PASSWORD=
|
||||
# Database name
|
||||
POSTGRES_DB=crm_db
|
||||
# Database user (superuser/owner)
|
||||
POSTGRES_USER=crm_user
|
||||
# Database host (container name in Docker network)
|
||||
DB_HOST=crm-postgres
|
||||
# Full database URLs (constructed from DB_PASSWORD/DB_HOST if not set explicitly)
|
||||
DATABASE_URL=postgresql+asyncpg://crm_api:${DB_PASSWORD}@crm-postgres:5432/${POSTGRES_DB}
|
||||
AUTH_DATABASE_URL=postgresql+asyncpg://crm_auth:${DB_PASSWORD}@crm-postgres:5432/${POSTGRES_DB}
|
||||
WORKER_DATABASE_URL=postgresql+asyncpg://crm_worker:${DB_PASSWORD}@crm-postgres:5432/${POSTGRES_DB}
|
||||
MIGRATION_DATABASE_URL=postgresql+asyncpg://crm_migration:${DB_PASSWORD}@crm-postgres:5432/${POSTGRES_DB}
|
||||
|
||||
# === REDIS (required) ===
|
||||
REDIS_PASSWORD=
|
||||
REDIS_HOST=crm-redis
|
||||
REDIS_URL=redis://:${REDIS_PASSWORD}@crm-redis:6379/0
|
||||
|
||||
# === SECURITY (required) ===
|
||||
# Secret key for signing, sessions (use a secure random string >= 32 chars)
|
||||
SECRET_KEY=
|
||||
|
||||
# === SSH VERIFICATION (optional, deploy.py verification only) ===
|
||||
SSH_KEY=/a0/usr/workdir/.ssh/coolify-01-root
|
||||
SERVER_IP=46.225.91.159
|
||||
# Login test credentials (optional, for deploy verification)
|
||||
LOGIN_EMAIL=
|
||||
LOGIN_PASSWORD=
|
||||
|
||||
# === APPLICATION ===
|
||||
# Environment: development | production | testing
|
||||
ENVIRONMENT=development
|
||||
|
||||
ENVIRONMENT=production
|
||||
# Log level: DEBUG | INFO | WARNING | ERROR
|
||||
LOG_LEVEL=INFO
|
||||
|
||||
# Database pool
|
||||
DB_POOL_SIZE=10
|
||||
DB_MAX_OVERFLOW=20
|
||||
DB_ECHO=false
|
||||
|
||||
# Session settings
|
||||
SESSION_TTL_SECONDS=28800
|
||||
SESSION_COOKIE_NAME=leocrm_session
|
||||
SESSION_COOKIE_SECURE=false
|
||||
SESSION_COOKIE_SAMESITE=strict
|
||||
SESSION_COOKIE_HTTPONLY=true
|
||||
|
||||
# Password hashing
|
||||
BCRYPT_ROUNDS=12
|
||||
PASSWORD_RESET_EXPIRY_HOURS=1
|
||||
|
||||
# CORS allowed origins (comma-separated, NO wildcards)
|
||||
CORS_ORIGINS=http://localhost:5173,http://localhost:3000
|
||||
CORS_ORIGINS=https://crm.media-on.de
|
||||
# Frontend URL
|
||||
FRONTEND_URL=https://crm.media-on.de
|
||||
# Session cookie secure (true in production)
|
||||
SESSION_COOKIE_SECURE=true
|
||||
|
||||
# Secret Key (for signing, sessions — use a secure random string ≥32 chars in prod)
|
||||
SECRET_KEY=change-me-in-production-use-a-secure-random-string
|
||||
# === DOCKER COMPOSE (optional overrides) ===
|
||||
# Container names
|
||||
POSTGRES_CONTAINER_NAME=crm-postgres
|
||||
REDIS_CONTAINER_NAME=crm-redis
|
||||
APP_CONTAINER_NAME=crm-app
|
||||
WORKER_CONTAINER_NAME=crm-worker
|
||||
# Volume names
|
||||
PGDATA_VOLUME_NAME=crm_pgdata
|
||||
REDISDATA_VOLUME_NAME=crm_redisdata
|
||||
STORAGE_VOLUME_NAME=crm_storage
|
||||
# Network names
|
||||
CRM_NETWORK_NAME=crm-net
|
||||
COOLIFY_NETWORK_NAME=coolify
|
||||
# Traefik host
|
||||
APP_HOST=crm.media-on.de
|
||||
APP_PORT=8000
|
||||
|
||||
# Storage (file uploads, DMS)
|
||||
STORAGE_PATH=/tmp
|
||||
# === STORAGE ===
|
||||
STORAGE_PATH=/data/storage
|
||||
# Storage backend: local (default) or s3
|
||||
STORAGE_BACKEND=local
|
||||
# S3-compatible storage (when STORAGE_BACKEND=s3)
|
||||
@@ -53,15 +99,15 @@ S3_SECRET_KEY=
|
||||
S3_REGION=us-east-1
|
||||
S3_SECURE=true
|
||||
|
||||
# SMTP / Email
|
||||
# === SMTP / EMAIL ===
|
||||
SMTP_HOST=localhost
|
||||
SMTP_PORT=587
|
||||
SMTP_USERNAME=
|
||||
SMTP_USER=
|
||||
SMTP_PASSWORD=
|
||||
SMTP_FROM_EMAIL=noreply@leocrm.local
|
||||
SMTP_USE_TLS=true
|
||||
SMTP_FROM=no-reply@localhost
|
||||
SMTP_TLS=true
|
||||
|
||||
# Rate limiting
|
||||
# === RATE LIMITING ===
|
||||
RATE_LIMIT_LOGIN_MAX=5
|
||||
RATE_LIMIT_LOGIN_WINDOW=900
|
||||
RATE_LIMIT_RESET_MAX=3
|
||||
@@ -71,10 +117,29 @@ RATE_LIMIT_RESET_CONFIRM_WINDOW=3600
|
||||
RATE_LIMIT_GENERAL_MAX=60
|
||||
RATE_LIMIT_GENERAL_WINDOW=60
|
||||
|
||||
# === AI / Search ===
|
||||
# Ollama Cloud API Key (für LiteLLM)
|
||||
# === DATABASE POOL ===
|
||||
DB_POOL_SIZE=10
|
||||
DB_MAX_OVERFLOW=20
|
||||
DB_ECHO=false
|
||||
|
||||
# === SESSION ===
|
||||
SESSION_TTL_SECONDS=28800
|
||||
SESSION_COOKIE_NAME=leocrm_session
|
||||
SESSION_COOKIE_SAMESITE=strict
|
||||
SESSION_COOKIE_HTTPONLY=true
|
||||
|
||||
# === PASSWORD HASHING ===
|
||||
BCRYPT_ROUNDS=12
|
||||
PASSWORD_RESET_EXPIRY_HOURS=1
|
||||
|
||||
# === AI / SEARCH ===
|
||||
# Ollama Cloud API Key (for LiteLLM)
|
||||
API_KEY_OLLAMA_CLOUD=
|
||||
# Embedding Modell (default: ollama/nomic-embed-text)
|
||||
# Embedding model (default: ollama/nomic-embed-text)
|
||||
SEARCH_EMBEDDING_MODEL=ollama/nomic-embed-text
|
||||
# LLM Modell für Query Understanding (default: ollama/deepseek-v4)
|
||||
# LLM model for query understanding (default: ollama/deepseek-v4)
|
||||
SEARCH_LLM_MODEL=ollama/deepseek-v4
|
||||
|
||||
# === GIT (for initial deployment) ===
|
||||
API_GIT_REPO=https://forgejo.media-on.de/Leopoldadmin/leocrm.git
|
||||
API_GIT_BRANCH=main
|
||||
|
||||
Reference in New Issue
Block a user