Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Vagrant setup to the Hugo setup #41

Open
wants to merge 3 commits into
base: setup/hugo
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/public
node_modules/
.vagrant
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
26 changes: 26 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -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