Skip to content

How could my postgres user password get changed or lost? #896

Closed
@sscots

Description

@sscots

My postgres container will build and fire up properly and work for a couple days or so but then randomly I'll start getting
"password authentication failed for user "postgres", Password does not match for user "postgres""

My docker-compose:

           postgres:
                  image: postgres:13.1
                  restart: always
                  environment:
                      - POSTGRES_PASSWORD=123
                      - PGDATA=/var/lib/postgresql/data/pgdata
                  ports:
                      - 5432:5432
                  volumes:
                    - ./postgres_data:/var/lib/postgresql

How is that possible? It has to do with something in the pgdata dir correct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions