NEXT.JS docker DNS not resolving
Unanswered
American black bear posted this in #help-forum
American black bearOP
I have a docker compose with fastapi and nextjs.
When I call my fastAPI endpoint on getStaticParams when nextjs builds, I call it with fetch("http://fastapi:8000/api/blog") , but nextjs can't find fastapi dns which is my docker name.
Yes, both of them are in the same bridge network.
Yes, my nextjs dockerfile depends on my fastapi server.
Yes, I have tried a wait-for.sh
Yes, I can ping to each other using DNS.
Can someone help me?
Thanks!
When I call my fastAPI endpoint on getStaticParams when nextjs builds, I call it with fetch("http://fastapi:8000/api/blog") , but nextjs can't find fastapi dns which is my docker name.
Yes, both of them are in the same bridge network.
Yes, my nextjs dockerfile depends on my fastapi server.
Yes, I have tried a wait-for.sh
Yes, I can ping to each other using DNS.
Can someone help me?
Thanks!