Skip to content

Redash fails to start via docker-compose #4739

Closed
@ezkl

Description

@ezkl

Issue Summary

Redash cannot be started from scratch using docker-compose due to recent upstream changes to the postgres docker image. This issue was also discussed recently on the redash forums.

Steps to Reproduce

NOTE: These steps should be run on a "fresh" install without existing docker images or anonymous volumes. This can be reproduced by using docker-compose down with additional flags for removing anonymous volumes and referenced images. I've not included the full command here for fear people will copy and paste and destroy data unintentionally.

  1. git clone [email protected]:getredash/redash.git
  2. cd redash && docker-compose up -d

Technical details:

After running docker-compose up, the postgres container prints the following error to the logs and exits before being restarted and repeating the same process again:

postgres_1   | Error: Database is uninitialized and superuser password is not specified.
postgres_1   |        You must specify POSTGRES_PASSWORD to a non-empty value for the
postgres_1   |        superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".
postgres_1   |
postgres_1   |        You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
postgres_1   |        connections without a password. This is *not* recommended.
postgres_1   |
postgres_1   |        See PostgreSQL documentation about "trust":
postgres_1   |        https://www.postgresql.org/docs/current/auth-trust.html

Changes were recently made to the docker-entrypoint.sh file packaged with new postgres docker images (including postgresql:9.5-alpine) that will stop the database from being initialized unless a password is set (via $POSTGRES_PASSWORD) or by allowing connections from all hosts (by setting $POSTGRES_HOST_AUTH_METHOD=trust.)

You can see the relevant PR and subsequent discussion for specifics.

I forked redash and pushed a branch including a small change to the docker-compose.yml that sets POSTGRES_HOST_AUTH_METHOD to trust. I'll open a PR momentarily.

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