Configuration
Backend
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.SERVE_FRONTEND: Allows to serve the frontend using the FastAPI backend. This way, the frontend and backend can be served on the same domain, which makes it easier to run and avoids CORS issues.API_PREFIX: Must be set to/apiwhenSERVE_FRONTENDis True. This makes all the backend requests go tolocalhost:8400/api/pinginstead oflocalhost:8400/ping. Please make sure thatVITE_API_BASE_URLof the frontend contains this prefix as well.
Backend: Example configuration file
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=true
SERVE_FRONTEND=true
API_PREFIX=/apiFrontend
VITE_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.com/api.VITE_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.
Frontend: Example configuration file
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'Last updated on