I have trouble getting the server url right on production. I have set the
serverUrl
property to
process.env.SERVER_URL || http://localhost:4000
. That env variable is also set inside the docker container to the production url. But when I open it is stuck on the first user screen having the popup loading in the middle.
use the variable name
process.env.PAYLOAD_PUBLIC_SERVER_URL
because if you don't prefix your env var with
PAYLOAD_PUBLIC_
, it won't be accessible in your admin panel
if you
doprefix it like that, we will automatically expose it for you
Yup, that fixes it. Thanks!