Configuration
Overview
The backend is configured via an .env file, which should be placed in the same directory as your compose.yaml. This file defines all environment-specific variables required for the backend to function correctly.
To get started, examine the default values provided in .env.template:
1POSTGRES_USER=dev
2POSTGRES_PASSWORD=dev
3POSTGRES_DB=qasm
4POSTGRES_PORT=5432
5POSTGRES_HOST=postgres
6SQLALCHEMY_DRIVER=postgresql+psycopg
7API_BASE_URL=http://localhost:8000/
8CORS_ALLOW_ORIGINS=["*"]
9CORS_ALLOW_CREDENTIALS=TRUE
10CORS_ALLOW_METHODS=["*"]
11CORS_ALLOW_HEADERS=["*"]
Download this template: .env.template
Options
The following environment variables are available for configuring the backend:
Variable |
Description |
Default |
---|---|---|
|
The username used to connect to the PostgreSQL database. |
|
|
Password for the PostgreSQL user. |
|
|
Name of the PostgreSQL database to connect to. |
|
|
Port on which the PostgreSQL server is accessible. |
|
|
Hostname or IP address of the PostgreSQL server. Use |
|
|
SQLAlchemy driver string used to construct the database URL. |
|
|
Base URL of the backend API, used to construct absolute URLs internally. |
|
|
JSON-formatted list of allowed origins for Cross-Origin Resource Sharing (CORS). |
|
|
Whether to allow credentials (cookies, authorization headers) in CORS requests. |
|
|
List of HTTP methods permitted in CORS requests. |
|
|
list of HTTP headers allowed in CORS requests. |
|