Skip to content

Can't start container with existing volume.  #440

@webpalych

Description

@webpalych

What is the bug or the crash?

I updated my application and needed to rebuild images, so I restarted my docker-compose and postgis container no longer starts. In container logs I see an error "ERROR: must be superuser to alter superuser roles or change superuser attribute". If i don't use volume or use new empty volume, container starts.

Fragment of my docker-compose.yml

my-app.db:
    image: kartoza/postgis:14-3.3
    restart: always
    environment:
      POSTGRES_PASSWORD: $DB_PASSWORD
      POSTGRES_USER: $DB_USER
      POSTGRES_DB: $DB_NAME
    healthcheck:
      test: [ "CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}" ]
      interval: 5s
      timeout: 5s
      retries: 5
    ports:
      - '5433:5432'
    volumes:
     - ./postgres-data:/var/lib/postgresql/14

Steps to reproduce the issue

_

Versions

kartoza/postgis:14-3.3

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions