Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- mode: ruby -*-
- # vi: set ft=ruby :
- VAGRANTFILE_API_VERSION = "2"
- Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
- # Use Ubuntu 14.04 Trusty Tahr 64-bit as our operating system
- config.vm.box = "ubuntu/trusty64"
- # Configurate the virtual machine to use 2GB of RAM
- config.vm.provider :virtualbox do |vb|
- vb.customize ["modifyvm", :id, "--memory", "2048"]
- end
- # Forward the Rails server default port to the host
- config.vm.network :forwarded_port, guest: 3000, host: 3000 # Rails
- config.vm.network :forwarded_port, host: 1080, guest: 1080 # MailCatcher
- config.vm.network :forwarded_port, host: 5000, guest: 5000 # Foreman
- config.ssh.forward_agent = true
- # Use Chef Solo to provision our virtual machine
- config.vm.provision :chef_solo do |chef|
- chef.cookbooks_path = ["cookbooks", "site-cookbooks"]
- chef.add_recipe "apt"
- chef.add_recipe "nodejs"
- chef.add_recipe "ruby_build"
- chef.add_recipe "rbenv::user"
- chef.add_recipe "rbenv::vagrant"
- chef.add_recipe "vim"
- chef.add_recipe 'postgresql::server'
- # Install Ruby 2.2.1 and Bundler
- # Set an empty root password for MySQL to make things simple
- chef.json = {
- postgresql: {
- config: {
- listen_addresses: '*',
- port: '5432'
- },
- password: {
- postgres: 'password'
- }
- },
- rbenv: {
- user_installs: [{
- user: 'vagrant',
- rubies: ["2.2.1"],
- global: "2.2.1",
- gems: {
- "2.2.1" => [
- { name: "bundler" }
- ]
- }
- }]
- }
- }
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement