Environment Variables

Application, Server & Database

Application

VariableDefaultDescription
DEBUGfalseGlobal dev/prod switch — read once at startup via LazyLock. Enables: debug log level, detailed error pages, admin template hot reload. In production (false): warn level, generic errors.
BASE_DIR.Application root directory
PROJECT_NAMEmyprojectProject name (used for root_urlconf)
TIME_ZONEUTCTimezone (not yet implemented)
DEFAULT_AUTO_FIELDDefault auto field type for models
LANGsystem localeCLI language (fr, en, de, es, it, pt, ja, zh, ru). Priority: .env > system locale (LC_ALL, LC_MESSAGES) > en

Server

VariableDefaultDescription
IP_SERVER127.0.0.1Listening IP address
PORT3000Listening port
SECRET_KEYdefault_secret_keySecret key (CSRF, signatures) — must be changed in production

Database

Connection

VariableDefaultDescription
DB_URLFull connection URL (takes priority over all component variables)
DB_ENGINEsqliteEngine: postgres, mysql, mariadb, sqlite
DB_USERUsername (required except for SQLite)
DB_PASSWORDPassword (required except for SQLite)
DB_HOSTlocalhostHost
DB_PORT5432 / 3306Port (default depends on engine)
DB_NAMElocal_base.sqliteDatabase name

Connection pool

VariableDefaultDescription
DB_MAX_CONNECTIONS100Maximum pool size
DB_MIN_CONNECTIONS20Minimum pool size

Timeouts

VariableDefaultUnitDescription
DB_CONNECT_TIMEOUT2secondsConnection establishment timeout
DB_ACQUIRE_TIMEOUT500millisecondsPool acquire timeout
DB_IDLE_TIMEOUT300secondsIdle connection lifetime
DB_MAX_LIFETIME3600secondsMaximum connection lifetime

SQL Logging

VariableDefaultDescription
DB_LOGGINGfalseEnable SQL query logging (true, 1, yes)

Redirects

VariableDefaultDescription
REDIRECT_ANONYMOUS/Redirect URL for unauthenticated visitors
LOGGING_URL/Redirect URL to the login page
USER_CONNECTED_URL/Redirect URL after login