43 lines
823 B
Plaintext
43 lines
823 B
Plaintext
|
## Workflow:
|
||
|
- should work with flask run and dockerfile build
|
||
|
- local dev
|
||
|
- local pip install
|
||
|
- record versionless pips manually here
|
||
|
- pip freeze snapshots into project requirements
|
||
|
- docker build copies frozen requirements
|
||
|
|
||
|
|
||
|
## pip:
|
||
|
```
|
||
|
pip install flask
|
||
|
pip install python-dotenv
|
||
|
pip install flask-wtf
|
||
|
pip install flask-sqlalchemy
|
||
|
pip install flask-migrate
|
||
|
pip install flask-login
|
||
|
pip install email-validator
|
||
|
|
||
|
pip freeze > requirements.txt
|
||
|
```
|
||
|
|
||
|
## db cheat:
|
||
|
```
|
||
|
flask db migrate -m "users table"
|
||
|
flask db upgrade
|
||
|
|
||
|
flask db downgrade [base]
|
||
|
flask db upgrade
|
||
|
```
|
||
|
## build:
|
||
|
|
||
|
Dockerfile needs explicitly defined copies for:
|
||
|
- app
|
||
|
- config
|
||
|
- project dir
|
||
|
- requirements
|
||
|
|
||
|
## notes:
|
||
|
- environment comes through project env passes through compose
|
||
|
- keep env untracked but templated
|
||
|
- no dotenv here, dotflaskenv goes into image
|