for now, we have a bookdb docker container with content and referenced in main.py
This commit is contained in:
5
README
5
README
@@ -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
|
||||
|
||||
5
main.py
5
main.py
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user