Skip to content

Instantly share code, notes, and snippets.

Created October 13, 2013 23:42
What would you like to do?
Ventriloquist + Discourse
# -*- mode: ruby -*-
# vi: set ft=ruby :
# See
Vagrant.configure("2") do |config| = 'raring64'
# Comment out if you don't have plans to use vagrant-cachier
config.cache.auto_detect = true
# Make this VM reachable on the host network as well, so that other
# VM's running other browsers can access our dev server. :private_network, ip: ""
# Make it so that network access from the vagrant guest is able to
# use SSH private keys that are present on the host without copying
# them into the VM.
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |v, override|
# This setting gives the VM 1024MB of RAM instead of the default 384.
v.customize ["modifyvm", :id, "--memory", [ENV['DISCOURSE_VM_MEM'].to_i, 1024].max]
# This setting makes it so that network access from inside the vagrant guest
# is able to resolve DNS using the hosts VPN connection.
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
override.vm.box_url = ''
config.vm.provider :lxc do |lxc, override|
lxc.customize 'aa_profile', 'unconfined'
override.vm.box_url = ''
# Required to boot nested containers
config.vm.provision :shell, inline: %[
if ! [ -f /etc/default/lxc ]; then
cat <<STR > /etc/default/lxc
] :forwarded_port, guest: 3000, host: 4000 :forwarded_port, guest: 1080, host: 4080 # Mailcatcher
nfs_setting = RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", :nfs => nfs_setting
config.vm.provision :ventriloquist do |env| << %w( mailcatcher redis pg:9.1 )
env.platforms << %w( nodejs ruby )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment