A boilerplate for a flask based app with sqlalchemy and postgresql -> deploy easily on heroku
Install the app
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip install -r requirements.txtCopy the .env.example to .env.
The default URL for the database should work by default.
Run the database + adminer :
docker-compose -f docker-compose.dev.yml up -dReset the database :
flask reset_dbExplore the database :
- go to http://localhost:8123
- System = Postgresql
- Server = db # name of the service in the docker-compose
- Username =
- Password =
- Database = <database_name>
Launch the app
FLASK_ENV=development flask runTry to visit http://localhost:5000/api/v1/
https://devcenter.heroku.com/articles/getting-started-with-python
# with the heroku toolbelt installed : https://devcenter.heroku.com/articles/heroku-cli
heroku localSchedule a task for free every 10 minutes, every hour, or every day with heroku-scheduler :
- Use flask-migrate (alembic)
