These changes will work for accessing a local deploy from within in a virtual machine.
-
Find the IP of the host machine from inside the VM. For VirtualBox this tends to be
10.0.2.2
. -
In
settings.local.yml
- Add
http://10.0.2.2:3000
andhttp://10.0.2.2:3001
toweb_origin
- Add
"10.0.2.2"
tovirtual_hosts
- Set
virual_host_localhost
to10.0.2.2
# For CORS requests; separate multiple origins with a comma web_origin: http://10.0.2.2:3000, http://10.0.2.2:3001 virtual_hosts: ["127.0.0.1", "localhost", "10.0.2.2"] virtual_host_localhost: 10.0.2.2
- Add
-
Make sure to rebuild vets-api before starting
make rebuild; make up;
-
Make sure the VM can correctly access the host machine running vets-website and vets-api
-
Make sure the OS can correctly access the host machine running vets-website and vets-api
-
From within the VM go to
10.0.2.2:3001
VirtualBox has an issue with changing Promiscuous Mode
.
- In the virtual machine settings.