I am trying to upgrade postgres using the instructions here: https://github.com/kobotoolbox/kobo-docker/blob/master/doc/November-2022-Upgrade.md
When I got to step 2, I noticed that my docker-compose.backend.template.yml already had the line
image: postgis/postgis:9.5-2.5
And didn’t have the line
image: postgis/postgis:14-3.2
As implied in the instructions. I still carried on with the instructions with my file looking like this:
services:
postgres:
image: postgis/postgis:9.5-2.5
hostname: postgres
env_file:
- ../kobo-env/envfile.txt
- ../kobo-env/envfiles/databases.txt
- ../kobo-env/envfiles/aws.txt
volumes:
- ./.vols/db:/var/lib/postgresql/data
- ./.vols/db14:/var/lib/postgresql/data
But when I got to step 16, running the following command:
root@postgres:/# su - postgres -c '/usr/lib/postgresql/14/bin/pg_ctl -D /var/lib/postgresql/data/ start'
Causes the error:
ERROR: yaml.scanner.ScannerError: mapping values are not allowed here
in "/home/administrator/kobo-docker/docker-compose.backend.template.yml", line 10, column 13
Changing the yml file back to how it was in step 3 lets me start the container but running
su - postgres -c '/usr/lib/postgresql/14/bin/pg_ctl -D /var/lib/postgresql/data/ start'
causes the error that it can’t the directory. And indeed, /usr/lib/postgresql/14 doesn’t exist. Only /usr/lib/postgresql/9.5
Did I do something wrong? I did not customize my installation. My original version is (from going to ee.mydomain) is [2.8.1] - 2021-09-10