Created
April 14, 2014 00:56
-
-
Save Problematic/10608748 to your computer and use it in GitHub Desktop.
Vagrantfile to set up postgres, redis, ruby, and rails (uses docker)
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
#!/usr/bin/env bash | |
add-apt-repository ppa:chris-lea/node.js | |
apt-get update | |
apt-get install -y python-software-properties python g++ make nodejs | |
\curl -sSL https://get.rvm.io | bash -s stable --rails |
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 : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "hashicorp/precise64" | |
config.vm.provision "docker" do |d| | |
d.pull_images "paintedfox/postgresql" | |
d.pull_images "dockerfile/redis" | |
d.run "postgres", | |
image: "paintedfox/postgresql", | |
args: "-p 5432:5432 -e USER=vagrant -e PASS=vagrant" | |
d.run "redis", | |
image: "dockerfile/redis", | |
args: "-p 6379:6379" | |
end | |
config.vm.provision :shell, :path => "bootstrap.sh" | |
config.vm.network "forwarded_port", guest: 5000, host: 5000 | |
# config.vm.network "forwarded_port", guest: 5432, host: 5432 | |
# config.vm.network "forwarded_port", guest: 6379, host: 6379 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment