Problem with upgrading database to 15 version PostgeSQL

Hi!
I use a selfhosted baserow with traefik and switched to version 1.24.2.
I know that postgre version 15 is required for work. But when I upgrade to a new version, get a message that everything was successful.
But when the container starts, i get the same error in the logs about the need to update postgre.
Help me to update Postgres pls.

The command i used for update:

docker run \
  --name baserow-pgautoupgrade \
  -e BASEROW_PUBLIC_URL=https://baserow.mydomen.com \
  -e EMAIL_SMTP=true \
  -e EMAIL_SMTP_HOST=smtp.beget.com \
  -e EMAIL_SMTP_PORT=465 \
  -e EMAIL_SMTP_USER=admin@mydomen.com \
  -e EMAIL_SMTP_PASSWORD=%iv9Pass \
  -e EMAIL_SMTP_USE_SSL=true \
  -e FROM_EMAIL=admin@mydomen.com \
  -v baserow_data:/baserow/data \
  --restart no \
  baserow/baserow-pgautoupgrade:1.24.2

Part of my docker-compose.yml related to the baserow:

baserow:
    image: baserow/baserow:1.24.2
    container_name: baserow
    restart: always
    labels:
      - traefik.enable=true
      - traefik.http.routers.baserow.rule=Host(`baserow.mydomen.com`)
      - traefik.http.routers.baserow.tls=true
      - traefik.http.routers.baserow.entrypoints=web,websecure
      - traefik.http.routers.baserow.tls.certresolver=mytlschallenge
      - traefik.http.middlewares.baserow.headers.SSLRedirect=true
      - traefik.http.middlewares.baserow.headers.STSSeconds=315360000
      - traefik.http.middlewares.baserow.headers.browserXSSFilter=true
      - traefik.http.middlewares.baserow.headers.contentTypeNosniff=true
      - traefik.http.middlewares.baserow.headers.forceSTSHeader=true
      - traefik.http.middlewares.baserow.headers.SSLHost=coldnaked.ru
      - traefik.http.middlewares.baserow.headers.STSIncludeSubdomains=true
      - traefik.http.middlewares.baserow.headers.STSPreload=true
      - traefik.http.routers.baserow.middlewares=baserow@docker
    environment:
      - BASEROW_PUBLIC_URL=https://baserow.mydomen.com
      - EMAIL_SMTP=true
      - EMAIL_SMTP_HOST=smtp.beget.com
      - EMAIL_SMTP_PORT=465
      - EMAIL_SMTP_USER=admin@mydomen.com
      - EMAIL_SMTP_PASSWORD=${MAIL_PASS}
      - EMAIL_SMTP_USE_SSL=true
      - FROM_EMAIL=admin@mydomen.com
    volumes:
      - baserow_data:/baserow/data
volumes:
  baserow_data:

My VPS: 2 cores, 2 gb. RAĐś.

Hey @Efim, it looks like you’re running the right steps, but I noticed in the upgrade out the following message: PostgreSQL Database directory does not contain a database; Skipping upgrade. I realize the additional output saying that the upgrade was successful is confusing. We’re going to remove that part if it doesn’t actually do the upgrade.

Could it be that the upgrade container wasn’t attached to the same volume you’re running in production?

Strange things - it was randomly managed to make it work.

Here’s how I did it: after updating Postgre to 15 version, the container didnt start.
After that i changed the “baserow/baserow” image in docker-compose.yml to “baserow/baserow-pgautoupgrade” and launched this. He didn’t start up either.
Then i brought back “baserow/baserow” image and it started somehow.

Hi @Efim, that actually sounds like a successful update. When you ran the baserow/baserow-pgautoupgrade image via Docker Compose, it automatically updated your PostgreSQL data folder because then the correct volume was mounted. It’s expected for the container to stop after the upgrade. After that, you can use baserow/baserow because the data folder was updated.

1 Like