nystudio107 / docker-images

Docker image source files
MIT License
13 stars 10 forks source link

[php-prod-base:8.2-alpine] : pg_dump version mismatch #5

Closed ezawadzki closed 3 months ago

ezawadzki commented 3 months ago

Describe the bug

After executing : php craft update [my-package] It tries to perform a backup of database. But I got this error :

failed with exit code 1: pg_dump: error: aborting because of server version mismatch
pg_dump: detail: server version: 16.2; pg_dump version: 15.7

The pg_dump version: 15.7 belongs to nystudio107/php-prod-base:8.2-alpine Postgres 16.2 of my database container seems to be too recent, but hard to go back all my data to a previous version of Postgres. Is it possible to have a newer release ?

To reproduce

  1. Use a Postgres image "FROM postgres:16.2-alpine"
  2. Use this Php image : FROM nystudio107/php-prod-base:8.2-alpine
  3. In Php instance, try to execute "php craft update [my-package]" and say "yes" to backup

Expected behaviour

It should perform the backup.

Versions

khalwat commented 3 months ago

So I wouldn't consider this a bug -- you're using a more recent Postgres version. So you need to either downgrade your Postgres container, or install a later version of Postgres in the php-prod-base:8.2-alpine image

Here's what I use:

https://github.com/nystudio107/plugindev/blob/develop/.docker-config/postgres/Dockerfile