Last active
December 17, 2015 00:29
-
-
Save bergantine/5521525 to your computer and use it in GitHub Desktop.
Vagrantfile for Flask-Newproj #vagrant #flask #python #vagrantfile
This file contains 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 : | |
Vagrant::Config.run do |config| | |
config.vm.define :djangovm do |cfg| | |
# Every Vagrant virtual environment requires a box to build off of. | |
# The precise64_vagrant122 box is built for vagrant 1.2.2 | |
cfg.vm.box = "precise64_vagrant122" | |
# The url from where the 'config.vm.box' box will be fetched if it | |
# doesn't already exist on the user's system. | |
cfg.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
# Forward a port from the guest to the host, which allows for outside | |
# computers to access the VM, whereas host only networking does not. | |
cfg.vm.forward_port 80, 8080 | |
# To access our website, we can open a web browser on our workstation | |
# and go to http://localhost:5001. | |
cfg.vm.forward_port 5000, 5001 | |
# Enable provisioning with chef solo, specifying a cookbooks path | |
# (relative to this Vagrantfile), and adding some recipes and/or | |
# roles. | |
# | |
cfg.vm.provision :chef_solo do |chef| | |
chef.cookbooks_path = "cookbooks" | |
# compilers | |
chef.add_recipe "apt" | |
chef.add_recipe "build-essential" | |
# openssl is a requirement for postgresql | |
chef.add_recipe "openssl" | |
# git | |
chef.add_recipe "git" | |
# python, python-dev plus pip and virtualenv | |
chef.add_recipe "python" | |
chef.add_recipe "python::pip" | |
chef.add_recipe "python::virtualenv" | |
# tie it all together | |
chef.add_recipe "chef-cookbook-flaskproj" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment