forked from OpenSecuritySummit/oss2019
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
36 lines (31 loc) · 1.07 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Run vagrant up to get started
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.network "forwarded_port", guest: 1313, host: 1313, host_ip: "127.0.0.1"
config.vm.synced_folder ".", "/opt/oss2018"
config.vm.provider "virtualbox" do |vb|
vb.memory = "512"
end
config.vm.provision "shell", inline: <<-SHELL
set -x
apt-get update
apt-get install -y git curl
export HUGO_VERSION="0.49"
export SRC_DIR="/opt/oss2018"
export THEME_DIR="themes/oss-owasp"
curl -Ls https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz -o /tmp/hugo.tar.gz
tar xf /tmp/hugo.tar.gz -C /usr/local/bin
mkdir -p $SRC_DIR
cd $SRC_DIR
if [ ! -d "$THEME_DIR" ] ; then
git clone https://github.com/devcows/hugo-universal-theme.git themes/oss-owasp
else
cd $THEME_DIR
git pull https://github.com/devcows/hugo-universal-theme.git
fi
cd "$SRC_DIR"
hugo server --bind="0.0.0.0"
SHELL
end