Skip to content

flexible Database Connection in Dockercontainer #157

@ElmarDott

Description

@ElmarDott

I tried on my Ubuntu machine to run the openproject:17.4-slim container with the database URL parameter.

docker run -d --name openproject --restart=unless-stopped
-p 8080:80 --net local
-e DATABASE_URL=postgres://user:pwd@127.0.0.1:5432/openproject
-e OPENPROJECT_HOST__NAME=openproject.lab:8012
-e OPENPROJECT_HTTPS=false
-e OPENPROJECT_DEFAULT__LANGUAGE=en
-e SECRET_KEY_BASE=****
-v /media/share/docker/openproject/assets:/var/openproject/assets
openproject/openproject:17.4-slim

And after checking the logs, I found out that this version requires Postgres 17. Without any more profound investigation, it seems to me not always necessary to force upgrades to the latest available version of the DBMS. If there are some specific PostgreSQL features used, it makes more sense to define a minimal version like Postgres 11. So I mention a configuration switch initialized by default with the really minimal version of Postgres is needed. Especially if an ORM like Hibernate is used, there is huge flexibility. Also, the latest JDBC driver has minimal requirements; they do not always force the latest version. Maybe it could also be an option to include different JDBC drivers in the assets folder.

-e POSTGRES_VERSION = 14, ..., 18

It is really inconvenient for complex productive systems to always force a DBMS upgrade.

[1] https://bucardo.org/postgres_all_versions

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions