trieve icon indicating copy to clipboard operation
trieve copied to clipboard

ops: get keycloak and server to communicate within docker compose

Open cdxker opened this issue 1 year ago • 2 comments

Community channels

Matrix is preferred. Reach out on discord or Matrix for further assistance.

cdxker avatar May 17 '24 00:05 cdxker

The issue seems to be with the docker network inside of itself.

cdxker avatar May 17 '24 00:05 cdxker

This is a common problem in communicating with the API on docker-compose, it can be solved by implementing CORS support in the application code, there are several solutions in several popular languages, you can follow them and add support in the code. You can read more under this post: https://maximillianxavier.medium.com/solving-cors-problem-on-local-development-with-docker-4d4a25cd8cfe

(NOTE! this solution works only on Linux systems) Another solution is to move the API Server outside the internal docker network and use the attribute: network_mode: "host" instead of: networks: - app-network In order for the app to work correctly with the current logic, the "ingestion-worker" and "file-worker" services must also be moved to the "host" network.

jooni22 avatar May 24 '24 00:05 jooni22