-
Hi all, Recently I started a new project using Fief, with FastAPI backed API server. Now I'm using the Docker Desktop in MacOS, and now struggling from the docker compose network. I've tried Do you have any ideas for the Fief dev env on Mac Docker? Please share your experience! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I just created a docker container of the backend API with Fief together to run both servers in a single container. After the struggles earlier, especially with the Python version (latest Fief is only working with 3.11), it works like a charm! |
Beta Was this translation helpful? Give feedback.
-
Hmm, I see the problem. The thing is, since your server container is within the same Docker Compose project, it'll only be able to reach the Fief server through the internal hostname (i.e. the service name). Otherwise, you'll indeed need to tinker with Fortunately, there are ways to make it work without it. You can very well set your fief = FiefAsync(
"http://fief-server:8000",
"YOUR_CLIENT_ID",
"YOUR_CLIENT_SECRET",
) However, if you stop there, Fief won't recognize your workspace, since it's configured to match the host fief = FiefAsync(
"http://fief-server:8000",
"YOUR_CLIENT_ID",
"YOUR_CLIENT_SECRET",
host="localhost:8000",
) Now, the request will target As a side note, this is not specific to Mac OS, but rather to how Docker containers work :) |
Beta Was this translation helpful? Give feedback.
I just created a docker container of the backend API with Fief together to run both servers in a single container. After the struggles earlier, especially with the Python version (latest Fief is only working with 3.11), it works like a charm!