♻️ Simplify environment configuration (#2413)

This commit is contained in:
Sebastián Ramírez
2026-08-09 22:26:19 +02:00
committed by GitHub
parent 2d04828d6a
commit 9c8983e2a5
6 changed files with 47 additions and 68 deletions
+3 -7
View File
@@ -58,6 +58,8 @@ Set the `DOMAIN`, by default `localhost` (for development), but when deploying y
export DOMAIN=fastapi-project.example.com
```
The deployment Docker Compose configuration also uses `DOMAIN` to set the public frontend URL used in links generated by the backend.
Set the `POSTGRES_PASSWORD` to something different than `changethis`:
```bash
@@ -72,18 +74,12 @@ export SECRET_KEY="changethis"
Note: you can use the Python command above to generate a secure secret key.
Set the `FIRST_SUPER_USER_PASSWORD` to something different than `changethis`:
Set the `FIRST_SUPERUSER_PASSWORD` to something different than `changethis`:
```bash
export FIRST_SUPERUSER_PASSWORD="changethis"
```
Set the `FRONTEND_HOST` to the application URL. It is used to generate links in emails:
```bash
export FRONTEND_HOST="https://${DOMAIN?Variable not set}"
```
You can set several other environment variables:
* `PROJECT_NAME`: The name of the project, used in the API for the docs and emails.