for now, we have a bookdb docker container with content and referenced in main.py

This commit is contained in:
2021-01-07 22:41:53 +11:00
parent 995c19613e
commit e4606cdbeb
2 changed files with 6 additions and 4 deletions

5
README
View File

@@ -1,8 +1,5 @@
### TODO: get all this inside a docker container and use compose to do the whole set (pg, flask, ?)
see this for postgresal:
https://hub.docker.com/_/postgres (has several env vars that should work out)
and probably this:
https://docs.docker.com/compose/gettingstarted/ (for flask and maybe redis)
https://docs.docker.com/compose/gettingstarted/
# flask -> python web server

View File

@@ -11,7 +11,12 @@ import re
####################################### Flask App globals #######################################
app = Flask(__name__)
### what is this value? I gather I should chagne it?
# local DB conn string
DB_URL = 'postgresql+psycopg2://ddp:NWNlfa01@127.0.0.1:5432/library'
# using temp.docker DB conn string
DB_URL = 'postgresql+psycopg2://ddp:blahdeblah@172.18.0.20:5432/library'
app.config['SQLALCHEMY_DATABASE_URI'] = DB_URL
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config.from_mapping( SECRET_KEY=b'\xd6\x04\xbdj\xfe\xed$c\x1e@\xad\x0f\x13,@G')