From f803d40fd8868a2d4320fb3aedb4bd95f31ebc8b Mon Sep 17 00:00:00 2001 From: Leopoldadmin Date: Wed, 3 Jun 2026 23:52:02 +0000 Subject: [PATCH] Upload .env.docker.example --- .env.docker.example | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .env.docker.example diff --git a/.env.docker.example b/.env.docker.example new file mode 100644 index 0000000..51762c2 --- /dev/null +++ b/.env.docker.example @@ -0,0 +1,39 @@ +# ============================================================================= +# .env.docker.example — template for `docker compose --env-file .env.docker up` +# +# DO NOT COMMIT .env.docker. It contains real secrets. +# Usage: +# cp .env.docker.example .env.docker +# $EDITOR .env.docker +# docker compose --env-file .env.docker up --build +# ============================================================================= + +# --- PostgreSQL (local container) --------------------------------------------- +POSTGRES_USER=crm_user +# Generate a strong password, e.g.: +# python -c "import secrets; print(secrets.token_urlsafe(24))" +POSTGRES_PASSWORD=STRONG_PASSWORD_HERE +POSTGRES_DB=crm_db + +# --- CRM Application ---------------------------------------------------------- +# The host "postgres" is the docker-compose service name (internal DNS). +# The DRIVER is asyncpg for production PostgreSQL. +DATABASE_URL=postgresql+asyncpg://crm_user:STRONG_PASSWORD_HERE@postgres:5432/crm_db + +# --- AUTH_SECRET (REQUIRED, min 32 chars) ------------------------------------ +# JWT signing secret. MUST be at least 32 characters. +# Generate with: +# python -c "import secrets; print(secrets.token_urlsafe(48))" +AUTH_SECRET=MIN_32_CHARS_GENERATE_WITH_secrets_token_urlsafe_32_xxxxxxxxxxxx + +# --- CORS / environment ------------------------------------------------------- +# Comma-separated, NO wildcards. In dev we allow localhost:8000 (the app) and +# :5173 (e.g. Vite dev server). In production, restrict to the real domain. +CORS_ORIGINS=http://localhost:8000,http://localhost:5173 +ENVIRONMENT=production +LOG_LEVEL=INFO + +# --- JWT / bcrypt tuning (keep aligned with .env.example) --------------------- +JWT_ALGORITHM=HS256 +JWT_EXPIRY_HOURS=24 +BCRYPT_ROUNDS=12