Skip to content

Instantly share code, notes, and snippets.

@jamesconant
Created September 28, 2017 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesconant/491ca8198433c92e4925dec3e79da30e to your computer and use it in GitHub Desktop.
Save jamesconant/491ca8198433c92e4925dec3e79da30e to your computer and use it in GitHub Desktop.
#
# CHILD VM
#
# platform/apps/api/Vagrantfile
#
Vagrant.configure("2") do |config|
require_relative 'vagrant_config'
VagrantConfig.configure(config)
end
# platform/apps/api/vagrant_config.rb
#
module VagrantConfig
def self.configure(config)
config.vm.box = "debian/jessie64"
config.vm.synced_folder "apps/", "/vagrant", type: "virtualbox"
config.vm.network :forwarded_port, guest: 80, host: 4567
end
end
#
# PARENT VM (multi-machine coordinator)
#
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# some global configs...
config.vm.define "api" do |api|
require_relative 'apps/api/vagrant_config'
VagrantConfig.configure(api)
end
# more vms defined...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment