Finalize database deployment readiness
This commit is contained in:
7 files changed
+662
-33
No files matched your search
@@ -79,7 +79,7 @@ Then open:
|
||||
|
||||
## Environment Values
|
||||
|
||||
The app reads these from `.env`:
|
||||
The app reads these from `.env`. Use `.env.example` for local development and `.env.production.example` as the production checklist.
|
||||
|
||||
- `SECRET_KEY`
|
||||
- `APP_ENV`
|
||||
@@ -94,7 +94,15 @@ The app reads these from `.env`:
|
||||
- `MAIL_PASSWORD`
|
||||
- `MAIL_DEFAULT_SENDER`
|
||||
|
||||
For public deployments, set `APP_ENV=production`. Production mode enables secure cookies and refuses to start with the development `SECRET_KEY` or the local SQLite database. Use PostgreSQL for `DATABASE_URL`, then run `flask --app app db upgrade` during deploy. Set `RATELIMIT_STORAGE_URI` to a shared backend such as Redis so login and signup limits are enforced across processes.
|
||||
For local development, omit `DATABASE_URL` to use the default SQLite database at `data/boker-dev.sqlite3`.
|
||||
|
||||
For public deployments, set `APP_ENV=production`. Production mode enables secure cookies and refuses to start with the development `SECRET_KEY` or any SQLite database. Use PostgreSQL for `DATABASE_URL`, install dependencies from `requirements.txt`, then run:
|
||||
|
||||
```bash
|
||||
flask --app app db upgrade
|
||||
```
|
||||
|
||||
Set `RATELIMIT_STORAGE_URI` to a shared backend such as Redis so login and signup limits are enforced across processes.
|
||||
|
||||
## Site Admin Access
|
||||
|
||||
|
||||
Reference in new issue
Block a user