I’m trying to setup a developer environment where all components are containerized with Docker. If I run my API locally without a container, I can get things to work. However once I run my API in a Docker container any request I send to an endpoint that is protected by KeyCloak it results in ECONNREFUSED.
- KeyCloak (docker) http://localhost:8080/auth
- KeyCloak PostgreSql (docker)
- Node API (docker) http://localhost:3000
If I attempt to manually authenticate through the API (Direct Access Grants Enabled) it also only works if the API isn’t in a Docker contain.
I suspect this is a configuration issue. That KeyCloak doesn’t like the source of the requests.