![image](https://private-user-images.githubusercontent.com/5144837/403279667-457447cb-12c0-4f27-b04a-9867a7321df6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NTA0NjIsIm5iZiI6MTczODk1MDE2MiwicGF0aCI6Ii81MTQ0ODM3LzQwMzI3OTY2Ny00NTc0NDdjYi0xMmMwLTRmMjctYjA0YS05ODY3YTczMjFkZjYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMTc0MjQyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NTg5MDQ1YjQ0NDNiNDYxMWUyYTYwYzE1NWI2MGFmOWFhMGU5NmZhMTU4OTgzNWQ3Y2I3OTgxMmMyZWI3YTUzNiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.MMrNVtSgED0zXGk6HdgDRNW6QF69gaEBT10b4wKfazg)
IMPORTANT: Login/Admin related modules deliberately not implemented, and the blueprint can be modified for Flask-Login or Admin based fixtures.
-
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.
-
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