alt3 / cakebox

Framework agnostic virtual PHP Development Environment
128 stars 27 forks source link

Adds yaml option for private or public network interface #75

Closed bravo-kernel closed 7 years ago

bravo-kernel commented 7 years ago

This PR introduces a new yaml configuration option called network which allows you to choose between the vagrant private and public network interfaces.

Please note that the yaml will fall back to private if any other value is used.

Why

Using a public vagrant network allows you to expose your box over your (local) network which is extremely useful for situations where testing from your workstation alone just won't cut it (e.g. when developing mobile applications).

A real world use case would be testing your mobile application from a non-broken iPhone.:

  1. Configure your yaml to use the public vagrant network
  2. Create a public DNS record cakebox.yourdomain.com pointing to the ip-address of your box (e.g. 192.168.1.10)
  3. Open your iPhone and browse to cakebox.yourdomain.com

How

  1. cd cakebox
  2. git pull
  3. update your Cakebox.yaml
  4. vagrant reload