Skip to content

Commit

Permalink
Added env vars.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tonye Jack committed Nov 3, 2019
1 parent 4e50b93 commit 5738df6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .envrc-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export PG_DB=demo_postgres
export PG_USER=test_user
export MSQL_DB=demo_mysql
export MSQL_USER=test_user
export MSQL_PASSWORD=Test_user_password@123
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ _templates


.tox/
.envrc
10 changes: 5 additions & 5 deletions django_model_subscription/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@
},
'postgres': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': os.environ.get('PG_DB', 'demo_postgres'),
'USER': os.environ.get('PG_USER', 'test_user'),
'NAME': os.environ['PG_DB'],
'USER': os.environ['PG_USER'],
'HOST': 'localhost',
'PORT': '5432',
},
'mysql': {
'ENGINE': 'django.db.backends.mysql',
'NAME': os.environ.get('MSQL_DB', 'demo_mysql'),
'NAME': os.environ['MSQL_DB'],
'HOST': 'localhost',
'USER': os.environ.get('MSQL_USER', 'test_user'),
'PASSWORD': os.environ.get('MSQL_PASSWORD', 'Test_user_password@123'),
'USER': os.environ['MSQL_USER'],
'PASSWORD': os.environ['MSQL_PASSWORD'],
}
}

Expand Down

0 comments on commit 5738df6

Please sign in to comment.