Skip to content

Ready Blog blueprint in Flask for production ready code (with PostgreSQL and Docker)

Notifications You must be signed in to change notification settings

Mitalee/blog-blueprint-flask-sqlalchemy

Repository files navigation

IMPORTANT: Login/Admin related modules deliberately not implemented, and the blueprint can be modified for Flask-Login or Admin based fixtures.

Instructions

  • Clone the repository and cd into blog-blueprint-flask-sqlalchemy

  • Run docker-compose up -d --build

  • Run the required migrations docker-compose exec website alembic upgrade head

  • Now navigate to http://localhost:8000 in the browser to test it out.

Optional

  • Build a model (Posts, Tags, Comments)

  • After adding the model, autogenerate a migration sudo docker-compose exec --user "$(id -u):$(id -g)" website alembic revision --autogenerate -m "create foo table"

  • Finally, Get to alembic head after autogenerating a revision or to create db sudo docker-compose exec website alembic upgrade head

  • Check database migrations by running docker-compose exec website alembic current

About

Ready Blog blueprint in Flask for production ready code (with PostgreSQL and Docker)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •