-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
59 lines (50 loc) · 3.05 KB
/
Copy path.env.example
File metadata and controls
59 lines (50 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Only SM_DATABASE_URL is required. Everything else has sensible defaults.
# All module-level settings (SMTP, Celery, users, etc.) are now managed in
# the admin UI at /settings/modules — no env vars needed.
# Database (required). Default is local SQLite. To use the shared
# ../dev-services Postgres, uncomment the line below (db simple_module_python,
# user postgres/postgres):
SM_DATABASE_URL=sqlite+aiosqlite:///./app.db
# SM_DATABASE_URL=postgresql+asyncpg://postgres:postgres@localhost:5432/simple_module_python
# Postgres connection pool (per process). Defaults: pool_size 10 + max_overflow
# 20 = up to 30 connections per process. When running several uvicorn --workers,
# the total is workers × (pool_size + max_overflow) and must stay under the
# server's max_connections (Postgres default 100) — otherwise workers hit
# "asyncpg.TooManyConnectionsError: sorry, too many clients already" under load.
# e.g. 4 workers → keep the per-worker pool small:
# SM_DB_POOL_SIZE=5
# SM_DB_MAX_OVERFLOW=10
# Celery against the shared ../dev-services Redis. Host-run worker/beat use
# localhost; the docker-compose worker/beat override to the `redis` hostname.
# This project owns Redis logical DBs 4 (broker) and 5 (result backend).
# SM_BG_TASKS_BROKER_URL=redis://localhost:6379/4
# SM_BG_TASKS_RESULT_BACKEND=redis://localhost:6379/5
# Process identity (production must override SM_SECRET_KEY)
SM_ENVIRONMENT=development
SM_SECRET_KEY=change-me-in-production
# Auth provider: `users` (local accounts, the default) or `keycloak` (OIDC).
# Only one can be active at a time — they claim the same auth slot. A dev
# workspace has both installed because `uv sync --all-packages` installs every
# member, so the non-selected one is skipped at discovery instead of failing
# the boot with SM020. Ignored when only one provider is installed.
# SM_AUTH_PROVIDER=keycloak
# Dev-only: Vite asset URL (ignored in production builds)
SM_VITE_DEV_URL=http://localhost:5050
# Reverse proxy: trust X-Forwarded-* headers from a fronting TLS-terminating
# proxy (nginx, Traefik/Dokploy, ...). Required in production behind such a
# proxy — otherwise the app sees scheme=http, Inertia's client-side pushState
# throws a cross-scheme SecurityError, and login breaks. Set to `*` when the
# container is only reachable through the proxy, or to a comma-separated list
# of proxy IPs/CIDRs. Unset by default (no forwarded headers trusted).
# SM_TRUSTED_PROXY=*
# Host-level anonymous-access path prefixes (JSON array). Escape hatch for
# exposing a route without a session when no module owns it. Modules should
# prefer the method-aware `register_public_routes` hook instead.
# SM_AUTH_PUBLIC_PATHS=["/api/integrations/webhook", "/status"]
# First-boot admin seed (optional). Only applied when the users table is empty.
# Leave unset and use `uv run smpy users create-admin` instead if you prefer.
# SM_USERS_BOOTSTRAP_EMAIL=admin@example.com
# SM_USERS_BOOTSTRAP_PASSWORD=changeme
# Optional second non-admin seed user (handy in dev):
# SM_USERS_BOOTSTRAP_USER_EMAIL=user@example.com
# SM_USERS_BOOTSTRAP_USER_PASSWORD=changeme