Skip to content

Change PostgreSQL to Version 17 and OpenProject to Version 16 #112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: stable/16
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
##
# All environment variables defined here will only apply if you pass them
# to the OpenProject container in docker-compose.yml under x-op-app -> environment.
#
# All environment variables defined here will only apply if you pass them to
# the OpenProject container in docker-compose.yml under x-op-app -> environment.
# For the examples here this is already the case.
#
# Please refer to our documentation to see all possible variables:
# https://www.openproject.org/docs/installation-and-operations/configuration/environment/
#
TAG=15-slim
TAG=16-slim
OPENPROJECT_HTTPS=false
OPENPROJECT_HOST__NAME=localhost
PORT=127.0.0.1:8080
Expand All @@ -16,4 +16,4 @@ DATABASE_URL=postgres://postgres:p4ssw0rd@db/openproject?pool=20&encoding=unicod
RAILS_MIN_THREADS=4
RAILS_MAX_THREADS=16
PGDATA="/var/lib/postgresql/data"
OPDATA="/var/openproject/assets"
OPDATA="/var/openproject/assets"
2 changes: 1 addition & 1 deletion control/Dockerfile
Copy link

@StereotypicalCat StereotypicalCat Jun 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing work on this! Ive been working at upgrading my own installation. For postgres to be able to upgrade an eventual old installation (eg. from postgres 9.6, 10 and 13) the old postgres versions need to be installed. Maybe this should just add postgres-17 and not remove the old versions? 😊 (thats what worked for me at least)

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM debian:12
RUN apt-get update -qq && apt-get install wget gnupg2 -y && rm -rf /var/lib/apt/lists/*
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
RUN echo "deb http://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" > /etc/apt/sources.list.d/pgdg.list
RUN apt-get update -qq && apt-get install postgresql-9.6 postgresql-10 postgresql-13 -y && rm -rf /var/lib/apt/lists/*
RUN apt-get update -qq && apt-get install postgresql-17 -y && rm -rf /var/lib/apt/lists/*
RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

ENV LANG en_US.utf8
Expand Down
2 changes: 1 addition & 1 deletion control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Switch off your current installation (using the outdated postgres engine):
```
Fetch the latest changes from this repository:
```shell
git pull origin stable/15 # adjust if needed
git pull origin stable/16 # adjust if needed
```
Build the control plane:
```shell
Expand Down
2 changes: 1 addition & 1 deletion control/upgrade/scripts/00-db-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
set -o pipefail

CURRENT_PGVERSION="$(cat $PGDATA/PG_VERSION)"
NEW_PGVERSION="13"
NEW_PGVERSION="17"
PGWORKDIR=${PGWORKDIR:=/var/lib/postgresql/work}

if [ ! "$CURRENT_PGVERSION" -lt "$NEW_PGVERSION" ]; then
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ x-op-app: &app
DATABASE_URL: "${DATABASE_URL:-postgres://postgres:p4ssw0rd@db/openproject?pool=20&encoding=unicode&reconnect=true}"
RAILS_MIN_THREADS: ${RAILS_MIN_THREADS:-4}
RAILS_MAX_THREADS: ${RAILS_MAX_THREADS:-16}
# set to true to enable the email receiving feature. See ./docker/cron for more options
# Set to true to enable the email receiving feature. See ./docker/cron for more options
IMAP_ENABLED: "${IMAP_ENABLED:-false}"
volumes:
- "${OPDATA:-opdata}:/var/openproject/assets"

services:
db:
image: postgres:13
image: postgres:17
<<: *restart_policy
stop_grace_period: "3s"
volumes:
Expand Down