mgt doc updates
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
|
||||
pip:
|
||||
## Workflow:
|
||||
- should work with flask run locally and dockerfile build
|
||||
- local dev
|
||||
- local / venv pip install
|
||||
- record versionless pips manually here
|
||||
- pip freeze snapshots into project requirements
|
||||
- docker build then copies frozen requirements
|
||||
|
||||
|
||||
## pip:
|
||||
```
|
||||
pip install flask
|
||||
pip install python-dotenv
|
||||
@@ -10,12 +16,11 @@ pip install flask-sqlalchemy
|
||||
pip install flask-migrate
|
||||
pip install flask-login
|
||||
pip install email-validator
|
||||
|
||||
...
|
||||
pip freeze > requirements.txt
|
||||
```
|
||||
|
||||
db:
|
||||
|
||||
## db cheat:
|
||||
```
|
||||
flask db migrate -m "users table"
|
||||
flask db upgrade
|
||||
@@ -23,4 +28,17 @@ flask db upgrade
|
||||
flask db downgrade [base]
|
||||
flask db upgrade
|
||||
```
|
||||
## build notes:
|
||||
|
||||
Dockerfile needs dockerignore or preferably explicitly defined copies for:
|
||||
- app
|
||||
- config
|
||||
- project dir
|
||||
- requirements
|
||||
- not dotflaskenv, vars set with dockerfile
|
||||
|
||||
## notes:
|
||||
- compose has entry that overrides flask with uwsgi for prod
|
||||
- miminal environment vars come through project env, pass through compose
|
||||
- no dotenv here, dotflaskenv goes into image
|
||||
- keep env untracked but templated, dotflaskenv is tracked and public
|
||||
|
Reference in New Issue
Block a user