introduce debug option for dashboard class

This commit is contained in:
Valerio Lomanto 2025-02-17 13:36:39 +01:00
parent 22282d2c28
commit bb3ed8db68
Signed by: verglasz
GPG key ID: 33263D8CFCFEC285
2 changed files with 7 additions and 0 deletions

View file

@ -10,6 +10,7 @@ class soc::vuln_dashboard(
String $admin_contact = 'cert@cert.sunet.se', String $admin_contact = 'cert@cert.sunet.se',
String $docker_image = 'platform.sunet.se/verglasz/vuln-management/dashboard-dev', String $docker_image = 'platform.sunet.se/verglasz/vuln-management/dashboard-dev',
String $sso_proxy_network = 'sso', String $sso_proxy_network = 'sso',
Boolean $debug_mode = true,
) { ) {
$db_name=lookup('vuln-dashboard.dn_name', undef, undef, 'vuln_dashboard') $db_name=lookup('vuln-dashboard.dn_name', undef, undef, 'vuln_dashboard')
@ -21,6 +22,11 @@ class soc::vuln_dashboard(
$censys_api_id=lookup('vuln-dashboard.censys.api_id', undef, undef, 'null') $censys_api_id=lookup('vuln-dashboard.censys.api_id', undef, undef, 'null')
$app_config_file='/opt/vuln-dashboard/app-config.yaml' $app_config_file='/opt/vuln-dashboard/app-config.yaml'
if $debug_mode {
$django_debug='True'
} else {
$django_debug='False'
}
file { file {
'/opt/vuln-dashboard': '/opt/vuln-dashboard':

View file

@ -23,6 +23,7 @@ services:
DJANGO_ALLOWED_ORIGINS: <%= @allowed_origins %> DJANGO_ALLOWED_ORIGINS: <%= @allowed_origins %>
STATIC_ROOT: /app/static STATIC_ROOT: /app/static
DASHBOARD_CONFIG_FILE: /app/config.yaml DASHBOARD_CONFIG_FILE: /app/config.yaml
DJANGO_DEBUG: <%= @django_debug %>
init: true init: true
volumes: volumes:
- pocs-data:/app/stored_pocs - pocs-data:/app/stored_pocs