Skip to content
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

Docker / Postgres Versioning Issues #9040

Open
SchrodingersGat opened this issue Feb 6, 2025 · 1 comment
Open

Docker / Postgres Versioning Issues #9040

SchrodingersGat opened this issue Feb 6, 2025 · 1 comment
Labels
docker Docker / docker-compose question This is a question setup Relates to the InvenTree setup / installation process
Milestone

Comments

@SchrodingersGat
Copy link
Member

SchrodingersGat commented Feb 6, 2025

The interplay between the existing docker / docker-compose / postgresql architecture is causing some issues and can be improved.

Issues

Postgres Version Issues

Our existing docker-compose file uses a postgres:13 image - and this matches the version of postgres (13) we support in our Dockerfile. This causes problems if users do not user our docker-compose file, or adjust it to point to a newer version of postgresql.

In such a case, if they run invoke backup or invoke restore, the in-built version of psql-cli (13) is older than their database version - and fails.

Postgres EOL

Postgres-13 goes EOL in November 2025

Alpine-18

We use python:3.11-alpine3.18 - which supports up to postgres-15.

The latest image python:3.11-alpine3.21 supports up to posgres-17

Proposed Solution

The postgres-cli tool is backwards compatible when connecting to older database versions. So, we should aim that our docker image always ships with the latest version of postgresl-cli (and thus is compatible with any postgresql version older than that).

The proposed solution is two-fold:

Current Stable Branch (0.17.x)

For the stable branch, bump the supported version of postgresql in the docker image to 15 (the highest supported in the current alpine image)

Main Branch

In the main (latest) branch, update the base image to alpine3.21 and the support psql version to 17

Additionally, adjust the docker-compose file to use a newer postgresql version (as 13 is approaching EOL).

Any users who are currently using the docker-compose file will not be impacted (unless they intentionally update by changing their existing compose file).

Related Issues

@SchrodingersGat SchrodingersGat added bug Identifies a bug which needs to be addressed question This is a question triage:not-checked Item was not checked by the core team docker Docker / docker-compose setup Relates to the InvenTree setup / installation process and removed triage:not-checked Item was not checked by the core team bug Identifies a bug which needs to be addressed labels Feb 6, 2025
@SchrodingersGat SchrodingersGat added this to the 1.0.0 milestone Feb 6, 2025
@oneyed
Copy link

oneyed commented Feb 7, 2025

Hello!
That's nice, i was looking for a solution as i have my own pg in v17 and had the mismatch error when i did the initial setup.
Thank you for working on the issue !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Docker / docker-compose question This is a question setup Relates to the InvenTree setup / installation process
Projects
None yet
Development

No branches or pull requests

2 participants