docker build -t ia-flask:latest .
docker run --name ia-flask --restart unless-stopped -v ${PWD}:/working_dir -d -p 5000:5000 ia-flask
note: {PWD} may not work on Windows. See this Stack Overflow question for more info.
python manage.py test
Flask migrate is being used.
Commands
- ssh into docker instance
docker exec -it ia-flask /bin/bash
- You shouldn't need this one if directory /migrations exsit.
python manage.py db init
- Find changes in models
python manage.py db migrate
- Upgrade the db schema to latest models
python manage.py db upgrade