Skip to content

Commit

Permalink
midna: move db config to env
Browse files Browse the repository at this point in the history
  • Loading branch information
darakeon committed Jul 15, 2023
1 parent 0da0ff3 commit 167b674
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions midna/env/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ DJANGO_SUPERUSER_USERNAME=username
DJANGO_SUPERUSER_EMAIL=email
DJANGO_SUPERUSER_PASSWORD=password

DATABASE_NAME=dfm
DATABASE_USER=dfm_user
DATABASE_PASS=
DATABASE_HOST=172.17.0.1
DATABASE_PORT=3306

AWS_BUCKET=
AWS_DEFAULT_REGION=
AWS_ACCESS_KEY_ID=
Expand Down
10 changes: 5 additions & 5 deletions midna/src/midna/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@
},
'mysql': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'dfm',
'USER': 'dfm_user',
'PASSWORD': '',
'HOST': '172.17.0.1',
'PORT': '3306',
'NAME': environ['DATABASE_NAME'],
'USER': environ['DATABASE_USER'],
'PASSWORD': environ['DATABASE_PASS'],
'HOST': environ['DATABASE_HOST'],
'PORT': environ['DATABASE_PORT'],
'OPTIONS': {
'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"
}
Expand Down

0 comments on commit 167b674

Please sign in to comment.