#Deploy starter store front
14 messages · Page 1 of 1 (latest)
hi. could you share the errors you get?
this is the error i see in the logs. i tried sending request using the container name for the api and using a domain name. the error is the same
Where are you trying to deploy? What is the value of MEDUSA_BACKEND_URL env variable?
Where do you have the backend deployed?
It seems the build is failing while trying to generate static params for the collection detail pages. Specifically, by making a request to a 'store_backend' hostname it can't find.
My guess is you have your backend url misconfigured.
i am deploying on company servers. the value of medusa_backend_url is the "store_backend". it used to be the domain name that was allocated for the backend. but i had a feeling that the reason that the build was failing was because nginx is responsible for building the store front and serving the backend too. so i was trying to send requests to the container for the backend. deploying on vercel works however
and i checked the urls. they seem to be correct'
So for your company server You are deploying storefront and server through Docker. If that is the case i would make sure the backend is fully ready before the storefront build starts.
Also, i am not so profficient in Docker, but that store_backend value is not being resolver as a valid host
yea that was my attempt after sending requests through nginx failed. thanks a lot i appreciate the help
make sure, your backend is already built and running, cuz if the backend is not running at the expected URL it won't be able to connect and will fail
Have you created the Publishable key for the storefront and also added the NextJS url as part of the auth and store cors?
@bronze grotto @pine canopy thanks guys. I already fixed it but i really appreciate the help
You are welcome.
Also, can you post what the exact problem was and what solution you came up with?
This will help others people who might run into similar problems.
The problem was exactly what you said. Since i was serving both the backend and the store from nginx i was trying to build the store when the nginx wasnt ready. So i send requests using the container name duing build and when everything is up i use the domain name
o.o
that's a good approach.
better than having to wait for the backend to start then do the frontend.