Closed noloader closed 2 years ago
Two things here:
(1) Those multiple values for DB configuration are joined to create the DB URL needed for DefectDojo's configuration. There's also historical/framework issues in that Django supports providing a Python dict for the database configuration like:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'OPTIONS': {
'service': 'my_service',
'passfile': '.my_pgpass',
},
}
}
Support for DB URL was added to DefectDojo as many users who weren't familiar with Python data types like dict had issues with configuring the DB using syntax like above. Most people get URLs so that support was added to DefectDojo. However, the Django framework still understands a DB configuration like above and it seemed easier to have people provide individual values in dojoConfig.yml vs construct the full DB URL if they only need to change a single or few elements of that DB URL.
(2) As I said in issue #53 , I'll look into DD_DATABASE_EXISTS. I'm pretty sure that was address in the current refactor.
prepInstall.go
is using different envar names for for database gear.For example,
dojoConfig.yml
specifies:But
prepInstall.go
has:It is causing a lot of confusion. And worse, it seems to be breaking my ability to add a variable for
DD_DB_Exists
so the installer will actually skip the database installation and configuration whenDD_DB_Exists=true
.When I attempt to add a
DD_DATABASE_EXISTS
it produces a compile error: