- Install http://vagrantup.com/
- Clone this repo
- cd to
/vagrant/appand start hacking!
You can edit
/vagrant contents from the VM or from your own host. The changes are mirrored.
How everything is configured
nginx is a http proxy. Inside the VM, it proxies 80 => 3000 port.
You can start your app by running
It listens to 3000 port and doesn't detach from the terminal.
Port 80 from VM proxies to port 3000 on your localhost.
So, after starting VM using
vagrant up, you can access nginx by going to http://localhost:3000 in your browser.
We'll configure the dancer app to start as a service later.
How to reconfigure the environment
You can install new packages in the VM using
sudo apt-get install ..., as usual.
The VM contents is configured with Chef.
So you should also share your configuration with other users by editing
To add a new debian package to chef configuration, just add a
package 'PACKAGE_NAME' line to the
To add an arbitrary imperative initialization code, use a
bash "restart nginx" do code <<-EOH ANY SHELL CODE EOH end
If someone else has edited the recipe, you can run
vagrant reload to restart the VM and redeploy the chef configuration.