Skip to content

Instantly share code, notes, and snippets.

@Problematic
Created April 14, 2014 00:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Problematic/10608748 to your computer and use it in GitHub Desktop.
Save Problematic/10608748 to your computer and use it in GitHub Desktop.
Vagrantfile to set up postgres, redis, ruby, and rails (uses docker)
#!/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
# -*- 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