Volto Ports / Development inside docker

Hi!

I'm trying to run Plone/Volto inside my containerized development environment, following the instructions at https://training.plone.org/mastering-plone/instructions.html. Plone (backend) install fine and runs perfectly well but I have Port issues with Volto.

I start Volto with RAZZLE_BIND_ADDRESS=0.0.0.0 PORT=8082 RAZZLE_API_PATH=http://localhost:8081/Plone yarn start and I get CORS Errors because the html contains Port 8083 and I have no idea where this is from.

I have to admit that I had to port-map docker -p 8380-8389:8080-8089 (I have several other projects running in parallel) so my plan is to run Plone on 8081 and Volto on 8082 and access Plone at 8381 (that works) and Volto on 8382 (that brings up Port 8083 no clue why).

1 Like

I think the training is not explicit, but you should run Volto on your host, not in the container.

Are you following the entire Mastering Plone 6 Development training, or just using it as a guide for installation?

If the latter, then I would suggest starting over, and follow the official docs to Install Plone.

If the former, which of the two methods did you follow?

I think the problem is different: His development environment is in container. Developing in a container or on a VM is a common use case in larger orgs.

(that brings up Port 8083 no clue why)

The reason why this is happening is that Razzle in development mode serves the static files from a separate port than the main application, usually set to PORT +1

iirc, setting RAZZLE_API_PATH disables the internal volto proxy that avoids CORS issues. Try setting the variable RAZZLE_DEV_PROXY_API_PATH=http://localhost:8081/Plone instead

This thread is about running on a container (Cloud9 IDE)