Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion docker/entrypoint-uwsgi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ python3 manage.py check

DD_UWSGI_LOGFORMAT_DEFAULT='[pid: %(pid)|app: -|req: -/-] %(addr) (%(dd_user)) {%(vars) vars in %(pktsize) bytes} [%(ctime)] %(method) %(uri) => generated %(rsize) bytes in %(msecs) msecs (%(proto) %(status)) %(headers) headers in %(hsize) bytes (%(switches) switches on core %(core))'

EXTRA_ARGS=""
if [ -n "${DD_UWSGI_MAX_FD}" ]; then
EXTRA_ARGS="${EXTRA_ARGS} --max-fd ${DD_UWSGI_MAX_FD}"
fi

exec uwsgi \
"--${DD_UWSGI_MODE}" "${DD_UWSGI_ENDPOINT}" \
--protocol uwsgi \
Expand All @@ -31,5 +36,6 @@ exec uwsgi \
--wsgi dojo.wsgi:application \
--buffer-size="${DD_UWSGI_BUFFER_SIZE:-8192}" \
--http 0.0.0.0:8081 --http-to "${DD_UWSGI_ENDPOINT}" \
--logformat "${DD_UWSGI_LOGFORMAT:-$DD_UWSGI_LOGFORMAT_DEFAULT}"
--logformat "${DD_UWSGI_LOGFORMAT:-$DD_UWSGI_LOGFORMAT_DEFAULT}" \
$EXTRA_ARGS
# HTTP endpoint is enabled for Kubernetes liveness checks. It should not be exposed as a service.
1 change: 1 addition & 0 deletions helm/defectdojo/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ data:
DD_UWSGI_PASS: unix:///run/defectdojo/uwsgi.sock
DD_UWSGI_NUM_OF_PROCESSES: '{{ .Values.django.uwsgi.app_settings.processes | default 2 }}'
DD_UWSGI_NUM_OF_THREADS: '{{ .Values.django.uwsgi.app_settings.threads | default 2 }}'
DD_UWSGI_MAX_FD: '{{ .Values.django.uwsgi.app_settings.max_fd }}'
Comment thread
tmablunar marked this conversation as resolved.
DD_DJANGO_METRICS_ENABLED: '{{ .Values.monitoring.enabled }}'
NGINX_METRICS_ENABLED: '{{ .Values.monitoring.enabled }}'
METRICS_HTTP_AUTH_USER: {{ .Values.monitoring.user | default "monitoring" }}
Expand Down
1 change: 1 addition & 0 deletions helm/defectdojo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ django:
app_settings:
processes: 2
threads: 2
# max_fd: 102400 # Uncomment to set the maximum number of file descriptors. If not set will be detected by uwsgi
enable_debug: false # this also requires DD_DEBUG to be set to True
certificates:
# includes additional CA certificate as volume, it refrences REQUESTS_CA_BUNDLE env varible
Expand Down