You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/en/open_source/upgrading/2.39.md
+109-2Lines changed: 109 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,114 @@
2
2
title: 'Upgrading to DefectDojo Version 2.39.x'
3
3
toc_hide: true
4
4
weight: -20240903
5
-
description: No special instructions.
5
+
description: Major upgrade of Postgres 16 to 17
6
6
exclude_search: true
7
7
---
8
-
There are no special instructions for upgrading to 2.39.x. Check the [Release Notes](https://github.com/DefectDojo/django-DefectDojo/releases/tag/2.39.0) for the contents of the release.
8
+
9
+
# PostgreSQL Major Version Upgrade in Docker Compose
10
+
11
+
This release incorporates a major upgrade of Postgres. When using the default docker compose setup you'll need to upgrade the Postgres data folder before you can use Defect Dojo 2.39.0.
12
+
13
+
There are lots of online guides to be found such as https://hub.docker.com/r/tianon/postgres-upgrade or https://github.com/pgautoupgrade/docker-pgautoupgrade.
14
+
15
+
There's also the [official documentation on `pg_upgrade`](https://www.postgresql.org/docs/current/pgupgrade.html), but this doesn't work out of the box when using Docker containers.
16
+
17
+
Sometimes it's easier to just perform the upgrade manually, which would look something like the steps below.
18
+
It may need some tuning to your specific needs and docker compose setup. The guide is loosely based on https://simplebackups.com/blog/docker-postgres-backup-restore-guide-with-examples.
19
+
If you already have a valid backup of the postgres 16 database, you can start at step 4.
20
+
21
+
---
22
+
23
+
## 0. Backup
24
+
25
+
Always back up your data before starting and save it somewhere.
26
+
Make sure the backup and restore is tested before continuing the steps below where the docker volume containing the database will be removed.
27
+
28
+
## 1. Start the Old Postgres Container
29
+
30
+
If you've acceidentally already updated your docker-compose.yml to the new versions, downgrade to postgres 16 for now:
31
+
32
+
Edit your `docker-compose.yml` to use the old Postgres version (e.g., `postgres:16.4-alpine`):
33
+
34
+
```yaml
35
+
postgres:
36
+
image: postgres:16.4-alpine
37
+
...
38
+
```
39
+
40
+
Start only the Postgres container which will now be 16.4:
"ELA-": "https://www.freexian.com/lts/extended/updates/", # e.g. https://www.freexian.com/lts/extended/updates/ela-1387-1-erlang
1829
1829
"ELBA-": "https://linux.oracle.com/errata/&&.html", # e.g. https://linux.oracle.com/errata/ELBA-2024-7457.html
1830
1830
"ELSA-": "https://linux.oracle.com/errata/&&.html", # e.g. https://linux.oracle.com/errata/ELSA-2024-12714.html
1831
+
"EUVD-": "https://euvd.enisa.europa.eu/vulnerability/", # e.g. https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-17599
1831
1832
"FEDORA-": "https://bodhi.fedoraproject.org/updates/", # e.g. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2024-06aa7dc422
1832
1833
"FG-IR-": "https://www.fortiguard.com/psirt/", # e.g. https://www.fortiguard.com/psirt/FG-IR-24-373
1833
1834
"GHSA-": "https://github.com/advisories/", # e.g. https://github.com/advisories/GHSA-58vj-cv5w-v4v6
1834
1835
"GLSA": "https://security.gentoo.org/", # e.g. https://security.gentoo.org/glsa/202409-32
1836
+
"GO-": "https://pkg.go.dev/vuln/", # e.g. https://pkg.go.dev/vuln/GO-2025-3703
1835
1837
"JSDSERVER-": "https://jira.atlassian.com/browse/", # e.g. https://jira.atlassian.com/browse/JSDSERVER-14872
1836
1838
"KB": "https://support.hcl-software.com/csm?id=kb_article&sysparm_article=", # e.g. https://support.hcl-software.com/csm?id=kb_article&sysparm_article=KB0108401
1837
1839
"KHV": "https://avd.aquasec.com/misconfig/kubernetes/", # e.g. https://avd.aquasec.com/misconfig/kubernetes/khv045
{"type": "Coverity issues", "formatVersion": 10, "suppressedIssueCount": 0, "issues": [{"mergeKey": "72bfbba76f98b46f51cf6645c43e836d", "occurrenceCountForMK": 1, "occurrenceNumberInMK": 1, "referenceOccurrenceCountForMK": null, "checkerName": "SIGMA.container_filesystem_write", "subcategory": "docker_compose", "type": "sigma.container_filesystem_write", "subtype": "docker_compose", "code-language": "text", "extra": "container_filesystem_write_docker_compose -- ImlFVhxAJ/cQpaURz/DPbcdn-cTLSuAy.yml -- ##\u03a3-markup - ##\u03a3-markup - services - web", "domain": "OTHER", "language": "Text", "mainEventFilePathname": "/HFEh/jfelEokZ/IOPdmEtf/EtaCywegk/TJfOXRH/qmAQHu-aKKJNxc.yml", "strippedMainEventFilePathname": "IadeFt-IGhxEGm.yml", "mainEventLineNumber": 5, "mainEventColumnNumber": null, "properties": {}, "functionDisplayName": null, "functionMangledName": null, "functionHtmlDisplayName": null, "functionSimpleName": null, "functionSearchName": null, "localStatus": null, "ordered": true, "events": [{"covLStrEventDescription": "The docker service container is configured to permit writing to the root filesystem. This makes some security attack vectors such as privilege escalation, denial-of-service or authorization bypass possible since the container instance's filesystem can be tampered with.", "eventDescription": "The docker service container is configured to permit writing to the root filesystem. This makes some security attack vectors such as privilege escalation, denial-of-service or authorization bypass possible since the container instance's filesystem can be tampered with.", "eventNumber": 1, "eventTreePosition": "1", "eventSet": 0, "eventTag": "Sigma main event", "filePathname": "/FgIS/JmWOWPmI/aYTdjcqF/DdHXGIILG/XTaImjm/kVhsWy-uiioKWl.yml", "strippedFilePathname": "uuYprG-uBYzRaE.yml", "lineNumber": 5, "columnNumber": null, "main": true, "moreInformationId": null, "remediation": false, "events": null}, {"covLStrEventDescription": "Explicitly set the `read-only` attribute of the service to `true` to create a service container with a read-only filesystem.", "eventDescription": "Explicitly set the `read-only` attribute of the service to `true` to create a service container with a read-only filesystem.", "eventNumber": 2, "eventTreePosition": "2", "eventSet": 0, "eventTag": "remediation", "filePathname": "/zYzQ/GdvvsmTv/OgguMuOt/KTYxQNmOD/SJTuieI/UTWGTQ-TWItlOE.yml", "strippedFilePathname": "DuCiSG-msIglfo.yml", "lineNumber": 5, "columnNumber": null, "main": false, "moreInformationId": null, "remediation": true, "events": null}], "stateOnServer": null, "localTriage": null, "checkerProperties": {"category": "Sigma", "categoryDescription": "Sigma", "cweCategory": "552", "weaknessIdCategory": "none", "issueKinds": ["SECURITY"], "eventSetCaptions": [], "impact": "Low", "impactDescription": "Low", "subcategoryLocalEffect": "", "subcategoryShortDescription": "Container allows filesystem write", "subcategoryLongDescription": "The docker service container is configured to permit writing to the root filesystem. This makes some security attack vectors such as privilege escalation, denial-of-service or authorization bypass possible since the container instance's filesystem can be tampered with."}}], "desktopAnalysisSettings": null, "error": null, "warnings": []}
"covLStrEventDescription": "The docker service container is configured to permit writing to the root filesystem. This makes some security attack vectors such as privilege escalation, denial-of-service or authorization bypass possible since the container instance's filesystem can be tampered with.",
34
+
"eventDescription": "The docker service container is configured to permit writing to the root filesystem. This makes some security attack vectors such as privilege escalation, denial-of-service or authorization bypass possible since the container instance's filesystem can be tampered with.",
"covLStrEventDescription": "Explicitly set the `read-only` attribute of the service to `true` to create a service container with a read-only filesystem.",
50
+
"eventDescription": "Explicitly set the `read-only` attribute of the service to `true` to create a service container with a read-only filesystem.",
"subcategoryLongDescription": "The docker service container is configured to permit writing to the root filesystem. This makes some security attack vectors such as privilege escalation, denial-of-service or authorization bypass possible since the container instance's filesystem can be tampered with."
0 commit comments