From: Sophie Brun <sophie@offensive-security.com>
Date: Tue, 31 May 2022 15:12:56 +0200
Subject: Change application port to 42003

---
 README.md                                             | 2 +-
 docs/content/en/integrations/api-v2-docs.md           | 2 +-
 docs/content/en/integrations/social-authentication.md | 2 +-
 dojo/settings/settings.dist.py                        | 2 +-
 helm/defectdojo/templates/configmap.yaml              | 2 +-
 helm/defectdojo/templates/django-deployment.yaml      | 4 ++--
 helm/defectdojo/templates/django-service.yaml         | 2 +-
 helm/defectdojo/templates/network-policy.yaml         | 2 +-
 nginx/nginx.conf                                      | 2 +-
 nginx/nginx_TLS.conf                                  | 2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/README.md b/README.md
index b0a3bd1..eff0808 100644
--- a/README.md
+++ b/README.md
@@ -62,7 +62,7 @@ cd django-DefectDojo
 docker compose logs initializer | grep "Admin password:"
 ```
 
-## For Docker Compose V1
+Navigate to <http://localhost:42003>.
 
 You can run Compose V1 by editing the files below to add the hyphen (-) between `docker compose`. 
 ```sh
diff --git a/docs/content/en/integrations/api-v2-docs.md b/docs/content/en/integrations/api-v2-docs.md
index a113452..cdbcd6d 100644
--- a/docs/content/en/integrations/api-v2-docs.md
+++ b/docs/content/en/integrations/api-v2-docs.md
@@ -138,7 +138,7 @@ Tools like Postman can be used for testing the API.
 Example for importing a scan result:
 
 -   Verb: POST
--   URI: <http://localhost:8080/api/v2/import-scan/>
+-   URI: <http://localhost:42003/api/v2/import-scan/>
 -   Headers tab:
 
     add the authentication header
diff --git a/docs/content/en/integrations/social-authentication.md b/docs/content/en/integrations/social-authentication.md
index ebf2a6b..f81a280 100644
--- a/docs/content/en/integrations/social-authentication.md
+++ b/docs/content/en/integrations/social-authentication.md
@@ -173,7 +173,7 @@ user, such as 'superuser'.
 3.  Under Authentication > Redirect URIs, add a *WEB* type of uri where
     the redirect points to
 
-    -   <http://localhost:8080/complete/azuread-tenant-oauth2/>
+    -   <http://localhost:42003/complete/azuread-tenant-oauth2/>
     -   **OR**
     -   **https://the_hostname_you_have_dojo_deployed:your_server_port/complete/azuread-tenant-oauth2/**
 
diff --git a/dojo/settings/settings.dist.py b/dojo/settings/settings.dist.py
index 55d214a..2978bef 100644
--- a/dojo/settings/settings.dist.py
+++ b/dojo/settings/settings.dist.py
@@ -31,7 +31,7 @@ root = environ.Path(__file__) - 3  # Three folders back
 # reference: https://pypi.org/project/django-environ/
 env = environ.FileAwareEnv(
     # Set casting and default values
-    DD_SITE_URL=(str, "http://localhost:8080"),
+    DD_SITE_URL=(str, "http://localhost:42003"),
     DD_DEBUG=(bool, False),
     DD_TEMPLATE_DEBUG=(bool, False),
     DD_LOG_LEVEL=(str, ""),
diff --git a/helm/defectdojo/templates/configmap.yaml b/helm/defectdojo/templates/configmap.yaml
index 71d28cc..193f529 100644
--- a/helm/defectdojo/templates/configmap.yaml
+++ b/helm/defectdojo/templates/configmap.yaml
@@ -14,7 +14,7 @@ data:
   DD_ADMIN_FIRST_NAME: {{ .Values.admin.FirstName | default "Admin" }}
   DD_ADMIN_LAST_NAME: {{ .Values.admin.LastName | default "User" }}
   DD_ALLOWED_HOSTS: {{ include "django.allowed_hosts" . }}
-  DD_SITE_URL: {{ .Values.site_url | default "http://localhost:8080" }}
+  DD_SITE_URL: {{ .Values.site_url | default "http://localhost:42003" }}
   DD_CELERY_BROKER_SCHEME: {{ if eq .Values.celery.broker "redis" }}{{ template "redis.scheme" . }}{{ end }}
   DD_CELERY_BROKER_USER: ''
   DD_CELERY_BROKER_HOST: {{ if eq .Values.celery.broker "redis" }}{{ template "redis.hostname" . }}{{ end }}
diff --git a/helm/defectdojo/templates/django-deployment.yaml b/helm/defectdojo/templates/django-deployment.yaml
index 6e0a035..bc30a47 100644
--- a/helm/defectdojo/templates/django-deployment.yaml
+++ b/helm/defectdojo/templates/django-deployment.yaml
@@ -112,7 +112,7 @@ spec:
       - name: metrics
         image: {{ .Values.monitoring.prometheus.image }}
         imagePullPolicy: {{ .Values.monitoring.prometheus.imagePullPolicy }}
-        command: [ '/usr/bin/nginx-prometheus-exporter', '-nginx.scrape-uri', 'http://127.0.0.1:8080/nginx_status']
+        command: [ '/usr/bin/nginx-prometheus-exporter', '-nginx.scrape-uri', 'http://127.0.0.1:42003/nginx_status']
         ports:
         - name: http-metrics
           protocol: TCP
@@ -246,7 +246,7 @@ spec:
         ports:
         - name: http
           protocol: TCP
-          containerPort: {{- if .Values.django.nginx.tls.enabled }} 8443 {{- else }} 8080 {{- end }}
+          containerPort: {{- if .Values.django.nginx.tls.enabled }} 8443 {{- else }} 42003 {{- end }}
         envFrom:
         - configMapRef:
             name: {{ $fullName }}
diff --git a/helm/defectdojo/templates/django-service.yaml b/helm/defectdojo/templates/django-service.yaml
index b64f3a0..8dfa917 100644
--- a/helm/defectdojo/templates/django-service.yaml
+++ b/helm/defectdojo/templates/django-service.yaml
@@ -33,7 +33,7 @@ spec:
   - name: http-metrics
     protocol: TCP
     port: 9113
-    targetPort: http-metrics
+    targetPort: 42003
     {{- end }}
 {{- if .Values.django.serviceType }}
   type: {{ .Values.django.serviceType }}
diff --git a/helm/defectdojo/templates/network-policy.yaml b/helm/defectdojo/templates/network-policy.yaml
index 7222dd7..029f1ec 100644
--- a/helm/defectdojo/templates/network-policy.yaml
+++ b/helm/defectdojo/templates/network-policy.yaml
@@ -45,7 +45,7 @@ spec:
         {{- if .Values.django.nginx.tls.enabled }}
         - port: 8443
         {{- else }}
-        - port: 8080
+        - port: 42003
         {{- end  }}
           protocol: TCP
 {{ end }}
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
index 1ece4cb..11ea092 100644
--- a/nginx/nginx.conf
+++ b/nginx/nginx.conf
@@ -26,7 +26,7 @@ http {
   }
   server {
     server_tokens off;
-    listen 8080;
+    listen 42003;
 
     gzip on;
     gzip_types      application/atom+xml  application/geo+json  application/javascript  application/x-javascript  application/json  application/ld+json  application/manifest+json  application/rdf+xml  application/rss+xml  application/xhtml+xml  application/xml  font/eot  font/otf  font/ttf  image/svg+xml  text/css  text/javascript text/plain  text/xml;
diff --git a/nginx/nginx_TLS.conf b/nginx/nginx_TLS.conf
index a91ff72..3f0bc7d 100644
--- a/nginx/nginx_TLS.conf
+++ b/nginx/nginx_TLS.conf
@@ -16,7 +16,7 @@ http {
   sendfile on;
   keepalive_timeout 65;
   server {
-      listen 8080;
+      listen 42003;
       location / {
           return 301 https://$host:8443$request_uri;
       }
