Created
September 23, 2013 17:15
-
-
Save funkatron/6673867 to your computer and use it in GitHub Desktop.
Vagrantfile for python web app dev VM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| VAGRANTFILEDIR=File.expand_path(File.dirname(__FILE__)) | |
| VAGRANTFILE=File.basename(__FILE__) | |
| VM_IP="192.168.33.10" | |
| SHARE_GUEST="/var/opt/www" | |
| SHARE_HOST="var-opt-www" | |
| Vagrant::Config.run do |config| | |
| # All Vagrant configuration is done here. The most common configuration | |
| # options are documented and commented below. For a complete reference, | |
| # please see the online documentation at vagrantup.com. | |
| # Every Vagrant virtual environment requires a box to build off of. | |
| config.vm.box = "python-app-server" | |
| # The url from where the 'config.vm.box' box will be fetched if it | |
| # doesn't already exist on the user's system. | |
| config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
| # Boot with a GUI so you can see the screen. (Default is headless) | |
| config.vm.boot_mode = :gui | |
| # Assign this VM to a host-only network IP, allowing you to access it | |
| # via the IP. Host-only networks can talk to the host machine as well as | |
| # any other machines on the same network, but cannot be accessed (through this | |
| # network interface) by any external networks. | |
| config.vm.network :hostonly, "#{VM_IP}" | |
| # set-up local shared folder. Use VBox sharing, not NFS | |
| # if the local folder DNE, create it | |
| localdir = "#{VAGRANTFILEDIR}/#{SHARE_HOST}" | |
| config.vm.share_folder( | |
| "#{SHARE_HOST}", # friendly name | |
| "#{SHARE_GUEST}", # mount point on VM | |
| localdir, # mount point on host/workstation | |
| :create => true | |
| ) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment