Develop Volto on a different machine

My customer with Windows uses a Linux development VM in its data-center. The VM has an internal address vm123.mycustomer.intern. When running cookiecutter-plone-starter and I connect to vm123.mycustomer.intern:3000 it still tries to load some resources from localhost:3000 and Volto fails to load. Backend/ClassicUI works on vm123.mycustomer.intern:8080 without problems. Obvious, the same setup on localhost works.

How do I configure Volto to work under this development conditions - which are (from my experience) in bigger corporate setups not that rare.

I've had success using gitpod.io and vscode. It allows you to have a local experience while the actual code is running on the gitpod.io cloud in docker containers.
Because gitpod.io creates ssh tunnels, calling localhost-based urls actually resolve properly.

You can either replicate the production setup (though you'd have to also take care of port 3001, it's used for hot reloading) or use

RAZZLE_API_PATH=http://vm123.mycustomer.intern:8080/Plone yarn start

Note that you'll probably also have to also take care of the CORS headers (in the Plone backend) in case you're running Volto localhost and the backend on a difference hostname.

One more note, I typically do all my Volto development in the same way, "remote", but I use SSH tunnels to proxy the 3000,3001 and 8080 ports, so they appear "local" on my browser.

1 Like

@tiberiuichim Since we need to document this: I would prefer a way without ssh tunnels, since this adds some overhead one has to know - and ssh tunneling is not common knowledge.
We already found ssh-tunnels are a way to work around, but it does not add happiness.

I will try to go the RAZZLE_API_PATH=... later. If this works it is an simple way to make it work.

I actually think the tunnelling option is the way to go. It just needs to be made more comfortable for the average developer. The Gitpod/Vscode option is the most comfortable option I've found so far.

This might work for SME and independent developers. But: I can not tell a corporate customer to login to some SaaS and place their data there. The VM has to run in the companies own data center.

Reasonable. That's an important constraint to bear in mind.

1 Like