Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't login using docker compose installation #32

Closed
CartierPierre opened this issue Jul 19, 2022 · 4 comments
Closed

Can't login using docker compose installation #32

CartierPierre opened this issue Jul 19, 2022 · 4 comments
Assignees

Comments

@CartierPierre
Copy link
Contributor

Hi, it's me again,
I'm using docker-compose installation.
I tried to login use default credentials or create new one but it's not working.
It redirects me to login page.
I see the INSERT in the log when creating an account, and the SELECT, but it says from conversin: Account not found

@realaravinth
Copy link
Member

Hello again!

I will require more information such as server logs(docker-compose logs -f) and the login request and response logs from the browser development tools to figure out what is really going on as there are multiple tests to ensure that authentication routes are working as expected.

But, I think this issue arises from the web framework that mCaptcha uses: mCaptcha is, by default, configured to serve localhost:7000. So accessing the app at http://localhost:7000 should work but http:/127.0.0.1:7000 or with any other hostname won't because of how the web framework's session middleware works.

So I recommend accessing the app at http://localhost:7000 to see if it resolves the issue.

@realaravinth realaravinth self-assigned this Jul 19, 2022
@CartierPierre
Copy link
Contributor Author

Oh, I'm running it on a server, so I call it http://myserve:7000. I can't use localhost for the server

@realaravinth
Copy link
Member

realaravinth commented Jul 19, 2022

In that case, kindly set MCAPTCHA_SERVER_DOMAIN to myserve`:

version: "3.9"

services:
  mcaptcha:
    image: mcaptcha/mcaptcha:latest
    ports:
      - 7000:7000
    environment:
      DATABASE_URL: postgres://postgres:password@mcaptcha_postgres:5432/postgres # set password at placeholder
      MCAPTCHA_REDIS_URL: redis://mcaptcha-redis/
      MCAPTCHA_SERVER_DOMAIN: myserve
      RUST_LOG: debug
      PORT: 7000
    depends_on:
      mcaptcha-postgres
      mcaptcha-redis

  mcaptcha_postgres:
    image: postgres:13.2
    volumes:
      - mcaptcha-data:/var/lib/postgresql/
    environment:
      POSTGRES_PASSWORD: password # change password
      PGDATA: /var/lib/postgresql/data/mcaptcha/

  mcaptcha-redis:
    image: mcaptcha/cache:latest

volumes:
  mcaptcha-data:

@CartierPierre
Copy link
Contributor Author

Perfect ! Thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants