When utilizing the getStaticProps
function to send a request to my backend API from another Docker container, I am encountering an issue. Despite ensuring that the API URL is accurate, the static page fails to be created. This is due to the requirement for the backend to be operational before the static page can be built. Since this process occurs at build-time, the other container is not yet up and running, causing a deadlock scenario.
Given this challenge, what would be the most effective solution? Although I attempted setting the depends_on
value for my other container, unfortunately it did not resolve the issue. Can you suggest an alternative approach to address this problem?