Need your urgent help on Docker/ Nextjs

As I am trying my best to launch my very first portfolio site built with django + nextjs,

I’ve noticed that during the docker build time, nextjs 's getStaticPaths or getStaticProps just can’t reach my django backend.

This will cause

“FetchError: request to http://backend:8000/api/blog/posts failed, reason: getaddrinfo EAI_AGAIN”,

I’m wondering how to generate these paths / objects.

Having nextjs getStaticPaths to refer to my local server isn’t going to be helpful when I launch this.

If anyone has any idea, please help me

Thank you, Have a great day!

you can check these useful links Docker - Django + NextJS
GitHub - yeganathan18/djanext: All in one - Django, Next.js 13, and GraphQL full stack starter kit 📦