Skip to content

Commit d389fff

Browse files
committed
Readme updated
1 parent cb0e93c commit d389fff

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

README.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
11
IMPORTANT:
22
Login/Admin related modules deliberately not implemented, and the blueprint can be modified for Flask-Login or Admin based fixtures.
3+
## Instructions
4+
* Run ```docker-compose up --build``` and navigate to ```http://localhost:8000``` in the browser to test it out.
35

4-
Run ```docker-compose up --build``` and navigate to ```http://localhost:5000``` in the browser to test it out.
6+
* To Initialize alembic run ```sudo docker-compose exec --user "$(id -u):$(id -g)" website alembic init alembic```
57

6-
Initialize alembic
7-
```docker-compose exec --user "$(id -u):$(id -g)" website alembic init alembic```
8+
* In alembic.ini change ```script_location``` to {flask_appname}/migrations comment out sqlalchemy.url(default is 'blogexample')
89

9-
In alembic.ini
10-
change ```script_location``` to {flask_appname}/migrations
11-
comment out sqlalchemy.url
12-
13-
In env.py
14-
import os, sys, and (create_app and db(from app.py))
10+
* In env.py import os, sys, and (create_app and db(from app.py))
1511
set up sqlalchemy url here
1612

17-
Build a model (Posts, Tags, Comments)
18-
13+
## *Optional*
1914

20-
autogenerate a migration
21-
```docker-compose exec --user "$(id -u):$(id -g)" website alembic revision --autogenerate -m "create foo table"```
15+
* Build a model (Posts, Tags, Comments)
16+
* After adding the model, autogenerate a migration ```sudo docker-compose exec --user "$(id -u):$(id -g)" website alembic revision --autogenerate -m "create foo table"```
2217

23-
Get to alembic head after autogenerating a revision
24-
```docker-compose exec website alembic upgrade head```
18+
Finally, Get to alembic head after autogenerating a revision or to create db ```sudo docker-compose exec website alembic upgrade head```

0 commit comments

Comments
 (0)