Skip to content

Commit

Permalink
Add environment variables for database connection parameters (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
samdoran authored Dec 13, 2024
1 parent 0522b10 commit 44f83bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
DB_NAME = os.getenv("SQLALCHEMY_DB", "release_notes_db")
DB_USER = os.getenv("SQLALCHEMY_USER", "postgres")
DB_PASSWORD = os.getenv("SQLALCHEMY_PASSWORD", "password")
SQLALCHEMY_DATABASE_URI = f"postgresql+psycopg://{DB_USER}:{DB_PASSWORD}@localhost/{DB_NAME}"
DB_HOST = os.getenv("DB_HOST", "localhost")
DB_PORT = os.getenv("DB_PORT", 5432)
SQLALCHEMY_DATABASE_URI = f"postgresql+psycopg://{DB_USER}:{DB_PASSWORD}@{DB_HOST}:{DB_PORT}/{DB_NAME}"

0 comments on commit 44f83bf

Please sign in to comment.