Created
June 10, 2015 17:13
-
-
Save monkseal/e4365f1215c16d45d7d2 to your computer and use it in GitHub Desktop.
Vagrantfile for Centos 6.6 with Postgres Port mapped
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
# Host => Guest (VM) | |
FORWARD_PORTS = { | |
3030 => 3030, # webrick | |
15_432 => 5432 # PostgreSQL | |
} | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
config.vm.box = 'opscode_centos-6.6' | |
config.vm.provider :virtualbox do |_f, override| | |
override.vm.box_url = 'https://s3.amazonaws.com/centos-vagrant/opscode_centos-6.6_chef-provisionerless.box' | |
end | |
config.ssh.password = 'vagrant' | |
config.vm.provision :shell, path: 'provision.sh', privileged: false | |
config.vm.synced_folder( | |
'.', | |
'/vagrant', | |
type: 'rsync', | |
rsync__exclude: [ | |
'.git/', | |
'.vagrant/', | |
'config/database.yml', | |
'log/*', | |
'tmp/' | |
] | |
) | |
FORWARD_PORTS.each do |host, guest| | |
config.vm.network :forwarded_port, host: host, guest: guest | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment