github.com/shyftnetwork/go-empyrean@v1.8.3-0.20191127201940-fbfca9338f04/shyft_documentation/Vagrantfile (about)

     1  Vagrant.configure(2) do |config|
     2    config.vm.box = "ubuntu/trusty64"
     3    config.vm.network :forwarded_port, guest: 4567, host: 4567
     4  
     5    config.vm.provision "bootstrap",
     6      type: "shell",
     7      inline: <<-SHELL
     8        sudo apt-add-repository ppa:brightbox/ruby-ng
     9        sudo apt-get update
    10        sudo apt-get install -yq ruby2.4 ruby2.4-dev
    11        sudo apt-get install -yq pkg-config build-essential nodejs git libxml2-dev libxslt-dev
    12        sudo apt-get autoremove -yq
    13        gem2.4 install --no-ri --no-rdoc bundler
    14      SHELL
    15  
    16    # add the local user git config to the vm
    17    config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig"
    18  
    19    config.vm.provision "install",
    20      type: "shell",
    21      privileged: false,
    22      inline: <<-SHELL
    23        echo "=============================================="
    24        echo "Installing app dependencies"
    25        cd /vagrant
    26        bundle config build.nokogiri --use-system-libraries
    27        bundle install
    28      SHELL
    29  
    30    config.vm.provision "run",
    31      type: "shell",
    32      privileged: false,
    33      run: "always",
    34      inline: <<-SHELL
    35        echo "=============================================="
    36        echo "Starting up middleman at http://localhost:4567"
    37        echo "If it does not come up, check the ~/middleman.log file for any error messages"
    38        cd /vagrant
    39        bundle exec middleman server --watcher-force-polling --watcher-latency=1 &> ~/middleman.log &
    40      SHELL
    41  end