Doccano: upgrade failed

Created on 26 Jan 2021  ·  3Comments  ·  Source: doccano/doccano

How to reproduce the problem

I have pulled the latest code from github, and built the docker.
When I run the command

docker-compose -f docker-compose.prod.yml up

the problem was as follows:

postgres_1  | 2021-01-26 10:37:55.287 UTC [1] FATAL:  database files are incompatible with server
postgres_1  | 2021-01-26 10:37:55.287 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 12, which is not compatible with this version 13.1.

Your Environment

  • Operating System:
  • Python Version Used:
  • When you install doccano:2021-01-26
  • How did you install doccano (Heroku button etc):docker
question

Most helpful comment

As your message says, the data directory initialized by PostgreSQL version 12 is incompatible with version 13.1.
If you want to update only frontend and backend, you can rewrite the PostgreSQL container version in docker-compose.prod.yml as follows:

postgres:
    image: postgres:12.0-alpine
    # image: postgres:13.1-alpine

All 3 comments

As your message says, the data directory initialized by PostgreSQL version 12 is incompatible with version 13.1.
If you want to update only frontend and backend, you can rewrite the PostgreSQL container version in docker-compose.prod.yml as follows:

postgres:
    image: postgres:12.0-alpine
    # image: postgres:13.1-alpine

Ok, Thank you. But it will mean that I have to modify the file docker-compose.prod.yml every time when I pull the code. So there is any plan for database upgrading?

As your message says, the data directory initialized by PostgreSQL version 12 is incompatible with version 13.1.
If you want to update only frontend and backend, you can rewrite the PostgreSQL container version in docker-compose.prod.yml as follows:

postgres:
    image: postgres:12.0-alpine
    # image: postgres:13.1-alpine

Sometimes, we should rebuild the image, so we can run this command:
docker-compose -f docker-compose.prod.yml build
and after that, we run the docker again by:
docker-compose -f docker-compose.prod.yml up

Was this page helpful?
0 / 5 - 0 ratings