| title |
|---|
Configuration |
Copy ci.env to prod.env and fill in the values:
PG_DSN: The URL of the PostgreSQL databaseJWT_SECRET: Create a random secret usingopenssl rand -hex 32CORS_ORIGINSandCORS_ORIGIN_REGEX: Specify allowed frontend domain names for CORS (see the FastAPI docs)ADMIN_EMAILandADMIN_PASSWORD: The credentials of the admin user, which is created when initializing the databaseSENTRY_DSN: The Sentry DSN for monitoring and error trackingBASE_URL: The base url of the API used for SSOALLOW_USER_REGISTRATION: Can be used to disallow user registration in the web app, currently used for production while bracket is still in betaALLOW_INSECURE_HTTP_SSO: Should not be used in production. Allows use of INSECURE requests for SSO auth.AUTO_RUN_MIGRATIONS: Whether to run (alembic) migrations automatically on startup or not. Migrations can be applied manually usinguv run alembic upgrade head.
This is an example of how the config file should look like:
PG_DSN='postgresql://bracket_ci:bracket_ci@localhost:5532/bracket_ci'
JWT_SECRET='60eed5c5dc7a919b8595a23d6c42ddd8274e4feea651dc028d9bee495bbb9acd'
CORS_ORIGINS='https://bracket.mydomain.com'
CORS_ORIGIN_REGEX='https://.*\.vercel\.app'
ADMIN_EMAIL='admin@example.com'
ADMIN_PASSWORD='some unused password'
SENTRY_DSN='my sentry dsn'
ALLOW_USER_REGISTRATION=false
ALLOW_INSECURE_HTTP_SSO=false
CAPTCHA_SECRET='xxx'
AUTO_RUN_MIGRATIONS=trueVITE_HCAPTCHA_SITE_KEY: The HCaptcha key used for captcha challenges when creating new accounts. You get the secret when you create a new site in HCaptcha.VITE_API_BASE_URL: The base URL of the backend API to which the frontend sends requests. For example:https://api.bracket.comVITE_ANALYTICS_DATA_DOMAIN: Thedata-domainattribute passed to the script for Plausible analyticsVITE_ANALYTICS_DATA_WEBSITE_ID: Thedata-website-idattribute passed to the script for Umami analyticsVITE_ANALYTICS_SCRIPT_SRC: The URL to the script for analytics purposes.
You can store the config in .env.local (as described in the Vite docs).
This is an example of how the config file should look like:
VITE_HCAPTCHA_SITE_KEY='10000000-ffff-ffff-ffff-000000000001'
VITE_API_BASE_URL='https://api.bracket.com'
VITE_ANALYTICS_SCRIPT_SRC='https://analytics.bracket.com/script.js'
VITE_ANALYTICS_DATA_DOMAIN='bracket.com'
VITE_ANALYTICS_DATA_WEBSITE_ID='bracket.com'