mirror of
https://github.com/fastapi/full-stack-fastapi-template.git
synced 2026-11-03 12:29:42 +00:00
♻️ Simplify environment configuration (#2413)
This commit is contained in:
committed by
GitHub
parent
2d04828d6a
commit
9c8983e2a5
+3
-7
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user