made explicit the difference between development and conatiner in wrapper (and docker-compose) so that we can run FLASK on port 5000 using db on localhost 55432. bookdb_webdev is a container, running on port 5001 and using bookdb_dev container on port 5432

This commit is contained in:
2023-06-13 00:27:10 +10:00
parent 51a259e0b2
commit 9e4ee74775
2 changed files with 2 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ app = Flask(__name__)
# local DB conn string
if os.environ['FLASK_ENV'] == "production":
DB_URL = 'postgresql+psycopg2://ddp:blahdeblah@bookdb:5432/library'
elif os.environ['FLASK_ENV'] == "development":
elif os.environ['FLASK_ENV'] == "container":
DB_URL = 'postgresql+psycopg2://ddp:blahdeblah@bookdb_dev:5432/library'
else:
DB_URL = 'postgresql+psycopg2://ddp:blahdeblah@127.0.0.1:55432/library'