Skip to content

Commit

Permalink
Remove db password from git control. PASSWORD NOW CHANGED ALSO
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamillar committed Aug 10, 2024
1 parent 7327b07 commit 092a9ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions alembic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ version_path_separator = os # Use os.pathsep. Default configuration used for ne
# are written from script.py.mako
# output_encoding = utf-8

#sqlalchemy.url = driver://user:pass@localhost/dbname
sqlalchemy.url = postgresql://persister:[email protected]/journaldb
#Overwritten by value in .env via env.py
sqlalchemy.url = dummy_placeholder

[post_write_hooks]
# post_write_hooks defines scripts or Python functions that are run
Expand Down
7 changes: 4 additions & 3 deletions alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@

# Add the URL
import dotenv
from gjk.config import Settings
import os
dotenv.load_dotenv()

settings = Settings(_env_file=dotenv.find_dotenv())
config.set_main_option("sqlalchemy.url", settings.db_url.get_secret_value())
DATABASE_URL = os.getenv("GJK_DB_URL")
config.set_main_option("sqlalchemy.url", DATABASE_URL)

# Interpret the config file for Python logging.
# This line sets up loggers basically.
Expand Down

0 comments on commit 092a9ca

Please sign in to comment.