Hello
I am trying to set up keycloak for a student project. I am using docker in order to run it with my api and postgre database. My plan is to use keycloak to manage accounts on my website and to allow connetion with oauth. Right now my api isn’t working, and i would like to test it straight from the auth page to better understand why i get a “page not found” error.
I do not understand why i do not have access to this page like in the tutorials:
I only get a message error “page not found” on http://localhost:8080/auth/
Here is my docker-compose in case this helps:
version: "3.9"
services:
api:
build: .
volumes:
- ./app:/app
command: ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5000", "--reload"]
ports:
- "5000:5000"
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
networks:
- network_sso
keycloak:
image: quay.io/keycloak/keycloak:22.0
command: start-dev
env_file:
- .env
ports:
- "8080:8080"
volumes:
- keycloak_data:/opt/jboss/keycloak/standalone/data
depends_on:
postgres:
condition: service_healthy
networks:
- network_sso
postgres:
image: postgres:10
env_file:
- .env
healthcheck:
test: "exit 0"
ports:
- "5432:5432"
networks:
- network_sso
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
keycloak_data:
networks:
network_sso:
driver: bridge
And my .env file is :
# Postgres
POSTGRES_DB=db_name
POSTGRES_USER=user_name
POSTGRES_PASSWORD=password
# KeyCloak
KC_DB= postgres
KC_DB_URL_HOST=postgres
KC_DB_URL_DATABASE=db_name
KC_DB_PASSWORD=password
KC_DB_USERNAME=user_name
KC_DB_SCHEMA=public
KEYCLOAK_ADMIN=admin
KEYCLOAK_ADMIN_PASSWORD=admin
Thanks for helping !