From 16c8f819a044577dd6354f1cadfca23d1b83c1f8 Mon Sep 17 00:00:00 2001 From: DIVYANSHI-PARASHAR Date: Sat, 23 Mar 2024 00:41:17 +0000 Subject: [PATCH] database name --- .github/workflows/ci.yml | 2 +- service/config.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d57ac5..2c3c4c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: export FLASK_APP=service:app pytest --pspec --cov=service --cov-fail-under=95 env: - DATABASE_URI: "postgresql+psycopg://postgres:pgs3cr3t@postgres:5432/testdb" + DATABASE_URI: "postgresql+psycopg://postgres:pgs3cr3t@postgres:5432/postgres" # Uncomment the following 2 lines during hands-on lab diff --git a/service/config.py b/service/config.py index 8b85e17..6941299 100644 --- a/service/config.py +++ b/service/config.py @@ -1,13 +1,13 @@ """ Global Configuration for Application """ + import os import logging # Get configuration from environment DATABASE_URI = os.getenv( - "DATABASE_URI", - "postgresql+psycopg://postgres:postgres@localhost:5432/postgres" + "DATABASE_URI", "postgresql+psycopg://postgres:postgres@localhost:5432/postgres" ) # Configure SQLAlchemy @@ -18,3 +18,5 @@ # Secret for session management SECRET_KEY = os.getenv("SECRET_KEY", "sup3r-s3cr3t") LOGGING_LEVEL = logging.INFO + +# DATABASE_URI: "postgresql+psycopg://postgres:pgs3cr3t@postgres:5432/postgres"