Skip to content
Snippets Groups Projects
Commit 1d64fbad authored by Nicolas Dandrimont's avatar Nicolas Dandrimont
Browse files

Add SWH_SENTRY_DSN to rpc servers, if defined

parent ec61c2b7
No related branches found
No related tags found
No related merge requests found
......@@ -89,16 +89,25 @@ define profile::swh::deploy::rpc_server (
format_log => "combined if=\$error_status",
}
$base_env = {
'SWH_CONFIG_FILENAME' => $conf_file,
'SWH_LOG_TARGET' => 'journal',
}
$sentry_dsn = lookup("swh::deploy::${config_key}::sentry_dsn", Optional[String], 'first', undef)
$env = $sentry_dsn ? {
undef => $base_env,
default => $base_env + {'SWH_SENTRY_DSN' => $sentry_dsn},
}
::gunicorn::instance {$service_name:
ensure => enabled,
user => $user,
group => $group,
executable => $executable,
config_base_module => $gunicorn_config_base_module,
environment => {
'SWH_CONFIG_FILENAME' => $conf_file,
'SWH_LOG_TARGET' => 'journal',
},
environment => $env,
settings => {
bind => $gunicorn_unix_socket,
workers => $backend_workers,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment