diff --git a/.gitignore b/.gitignore index b751946c..f2812b8f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /public node_modules/ +.vagrant diff --git a/README.md b/README.md index 2b111da2..89c9da00 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,13 @@ npm run watch Want to help developing? here is our beautiful [design](https://www.figma.com/file/Y3YPzUDYd7gzN3nyrje3Zqij/OTS-draft) - - - +### Vagrant + +1. Install VirtualBox +2. Install Vagrant +3. `cd` to the repo clone +4. `vagrant up` (first run takes a while as it has to download and configure the VM) +5. `vagrant ssh` to ssh into the VM +6. `cd /vagrant` +7. Then `npm install`, `hugo`, etc +8. To serve with hugo from within the VM: `hugo server --watch --bind 0.0.0.0` diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 00000000..ab420966 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,26 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "debian/stretch64" + config.vm.network "forwarded_port", guest: 1313, host: 1313 + config.vm.network "public_network" + + config.vm.provider "virtualbox" do |vb| + config.vm.synced_folder ".", "/vagrant", type: "virtualbox" + vb.memory = "512" + end + + config.vm.provision "shell", inline: <<-SHELL + apt-get update + apt-get upgrade + apt-get install -y build-essential curl vim wget + + wget https://github.com/gohugoio/hugo/releases/download/v0.38/hugo_0.38_Linux-64bit.deb + dpkg -i hugo_0.38_Linux-64bit.deb + + curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash - + apt-get update + apt-get install -y nodejs + SHELL +end