Created
September 28, 2017 12:14
-
-
Save jamesconant/491ca8198433c92e4925dec3e79da30e to your computer and use it in GitHub Desktop.
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
# | |
# 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