-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
50 lines (38 loc) · 1.56 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This VM provides a fresh Jekyll instalation.
# We use a standard Ubuntu Bionic as the base image, and install Ruby + Jekyll.
#
# The website source (Jekyll project) code is copied from the host machine to the VM where
# Jekyll can be executed transforming the templates, text files and assets into a static website.
# The generated website will be localted within the standard _site folder of the Jekyll
# project sources.
RUBY_VERSION="3.0.0"
IS_SASS_USED="true"
# Path in the host to the Jekyll project sources (Where the _config.yml file resides)
# Example Windows: C:\\example\\path\\JekyllProject
# Example Linux: /example/path/JekyllProject
PROJECT_SOURCE_IN_HOST="C:\\example\\path\\JekyllProject"
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/bionic64"
config.vm.provider "virtualbox" do |vb|
vb.name = "jekyll-vm"
vb.memory = "1024"
end
config.vm.synced_folder PROJECT_SOURCE_IN_HOST, "/vagrant/jekyll-project"
config.vm.network "forwarded_port", guest: 4000, host: 4000, host_ip: "127.0.0.1"
config.vm.network "forwarded_port", guest: 35729, host: 35729, host_ip: "127.0.0.1"
config.vm.provision "shell",
path: "provision/provision.sh",
privileged: false,
args: [RUBY_VERSION]
# MoonshineWebsite workaround: for error missing css directory
config.vm.provision "shell",
inline: "mkdir -p /vagrant/jekyll-project/css",
privileged: false
config.vm.provision "shell",
path: "provision/run.sh",
privileged: false,
args: [IS_SASS_USED],
run: "always"
end