Hi,
I found that running Plone on an unprivileged port, 2080 in my case, does not work because somewhere in the backend, the wrong URL is being generated. The problem with the URL is that it lacks the port, and that, in turn, leads to a CORS error. I verified by running the stack as root, which allowed it to bind to a privileged port (ie, "80"), where the site works, while it doesn't with the unprivileged port. Please see the screenshot below which highlights the missing port.
For normal development, and actually also for normal operation, I would much appreciate if it were possible to run the stack without having to use 'root' privileges. Does anyone know where these URLs are being generated, eg. the relevant package name(s)?
Without full configuration files and details about how things run it's difficult to say what goes wrong.
I find it odd that you're trying to run Plone using the "Deployment" configuration on your local machine. We usually run it "naked", with just Volto (the frontend) running on port 3000 and the Plone backend running from Docker.
Try to set a RAZZLE_API_PATH env var for the frontend service. How you do that, it depends on how you start that frontend. If you're running it "naked", outside of Docker, you can do it with:
The differences posted are the only differences from the default configuration. But you also have a point in saying that I could develop without Nginx in front, then deploy later with the default configuration (not ideal, but would work). The thing is that I don't have a full local development setup, but am trying to figure out how to use the containerized configuration to develop, because I don't want to "import" all the non-standard versions of npm, yarn etc. directly into my system. Ie, I want to keep my system clean and confine the "deviations" requried by the Plone stack inside those containers. An alternative would be to set up a VM with all the nonstandard stuff and try to get things working there, but that feels a bit heavy-handed as well.
My preferred solution would still be to fix the VirtualHost handling thing, then eg. mount any local development stuff as volumes into those containers as appropriate, and then develop that way.