Created
August 16, 2018 07:04
-
-
Save siraskalot/aefe990982177c76ff2415120075f031 to your computer and use it in GitHub Desktop.
Vagrant config
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
# vi: set ft=ruby : | |
current_dir = File.basename(Dir.getwd) | |
$script = <<-SCRIPT | |
#!/usr/bin/env bash | |
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y dist-upgrade | |
apt-get install -y nodejs | |
apt-get install -y tree | |
apt-get install -y htop | |
apt-get install -y mc | |
apt-get install -y zsh | |
chsh -s $(which zsh) | |
cd /home/vagrant/#{current_dir} && npm install --no-bin-link | |
SCRIPT | |
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/bionic64" | |
config.vm.hostname = "dev" | |
config.vm.network :forwarded_port, guest: 80, host: 3000 | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.provider "virtualbox" do |vb| | |
vb.name = current_dir | |
vb.memory = "4096" | |
end | |
config.vm.synced_folder ".", "/home/vagrant/#{current_dir}" | |
config.vm.provision :shell, inline: $script | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment