Skip to content

Authentication problem #87

Closed
Closed

Description

@Solaris17

Hello!

I am using portainer to deploy the docker-compose.yml

I modified it with the proper passwords via the instructions here:

https://docmost.com/docs/installation

While they start appropriately I never have access to a webpage.

The logs indicate the following:

ERROR [DatabaseModule] error: password authentication failed for user "docmost"

I am under the impression that is should be deploying these containers with my passwords and I should not be running into this problem. Additionally I made sure they were not only on the same network, but also added them to my bridge adapter and I still cannot access it.

Am I missing something?

Activity

  1. Philipinho commented on Jul 19, 2024

    @Philipinho
    Member

    Are you sure the POSTGRES_PASSWORD password matches the one DATABASE_URL?

  2. Solaris17 commented on Jul 19, 2024

    @Solaris17
    Author

    Are you sure the POSTGRES_PASSWORD password matches the one DATABASE_URL?

    Certainly. Here is an example of my conf. Maybe it will shed insight into what I am matching.

    `version: "3"

    services:
    docmost:
    image: docmost/docmost:latest
    depends_on:
    - db
    - redis
    environment:
    APP_URL: "http://localhost:3000"
    APP_SECRET: "STRAWBERRIES123"
    DATABASE_URL: "postgresql://docmost:CORNFLAKES12@db:5432/docmost?schema=public"
    REDIS_URL: "redis://redis:6379"
    ports:
    - "3000:3000"
    restart: unless-stopped
    volumes:
    - docmost:/app/data/storage

    db:
    image: postgres:16-alpine
    environment:
    POSTGRES_DB: docmost
    POSTGRES_USER: docmost
    POSTGRES_PASSWORD: CORNFLAKES12
    restart: unless-stopped
    volumes:
    - db_data:/var/lib/postgresql/data

    redis:
    image: redis:7.2-alpine
    restart: unless-stopped
    volumes:
    - redis_data:/data

    volumes:
    docmost:
    db_data:
    redis_data:`

    Additionally, I have played with specifying the IPs; as well as changing the usernames. Since the examaple docker-compose.yml located at https://docmost.com/docs/installation

    Does not appear to match in some regards to example variable usage located here: https://docmost.com/docs/self-hosting/environment-variables

    For example when starting the postgres image the logs indicate the following:

    The files belonging to this database system will be owned by user "postgres".

    Which differs from the example docker-compose which specifies the following:

    POSTGRES_USER: docmost

  3. Solaris17 commented on Jul 19, 2024

    @Solaris17
    Author

    I have corrected this. In my case unlike my example my actual passwords were much more complex and contained numerous special characters.

    After making them more simple the connection succeeded without issue. I also removed the quotes surrounding the "DATABASE_URL" string.

    Now I just need to increase the complexity and use special characters that will not break authentication.

  4. Philipinho commented on Jul 19, 2024

    @Philipinho
    Member

    I am glad you were able to resolve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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