Skip to content

Commit

Permalink
Merge 70da7a3 into 80a691b
Browse files Browse the repository at this point in the history
  • Loading branch information
halkeye committed Nov 13, 2019
2 parents 80a691b + 70da7a3 commit 01ec0ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions base/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'ENGINE': os.environ.get('DATABASE_ENGINE', 'django.db.backends.mysql'),
'NAME': os.environ.get('MYSQL_DATABASE', 'openeats'),
'USER': os.environ.get('MYSQL_USER', 'root'),
'PASSWORD': os.environ.get('MYSQL_ROOT_PASSWORD', ''),
'HOST': os.environ.get('MYSQL_HOST', 'db'),
'PORT': os.environ.get('MYSQL_PORT', '3306'),
'OPTIONS': {
'charset': 'utf8mb4'
},
'TEST': {
'NAME': os.environ.get('MYSQL_TEST_DATABASE', 'test_openeats')
}
}
}
if 'django.db.backends.mysql' in DATABASES['default']['ENGINE']:
DATABASES['default'].setdefault('OPTIONS', {})
DATABASES['default']['OPTIONS']['charset'] = 'utf8mb4'

# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/2.0/ref/settings/#allowed-hosts
Expand Down

0 comments on commit 01ec0ba

Please sign in to comment.