-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
57 lines (45 loc) · 1.4 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
51
52
53
54
55
56
57
# -*- mode: ruby -*-
# vi: set ft=ruby :
# ninjaDVA decelerate
#
# Requirements:
# Please execute `vagrant plugin install vagrant-triggers`
# if you start the vm the first time and get an error
Vagrant.configure("2") do |config|
#-------------------Your VM config----------------------------------
config.vm.define "decelerate"
# name and version of vm image
config.vm.box = "bento/debian-10"
# set hostname for vm
config.vm.hostname = "decelerate"
# disable standard synced folder
config.vm.synced_folder ".", "/vagrant", disabled: true
# remove old sources from the guest system
config.vm.provision "shell", inline: <<-END
rm -rf decelerate
END
# copy sources to the guest system
config.vm.provision "file", source: "decelerate", destination: "decelerate"
# install, build, and run docker
config.vm.provision "docker" do |d|
d.build_image "decelerate",
args: "-t decelerate"
d.run "decelerate",
image: "decelerate:latest",
args: "-p 80:80"
end
#----------------- ninjaDVA specific configuration -------------------------------
# test whether the vm is started in ninjaDVA context
# if yes copy challenges to dashboard vm
if File.exists?("../ninjadva.rb")
require "../ninjadva"
NinjaDVA.new(
config,
{
link_widget_links: [
{ :hostname => "decelerate", :name => "decelerate" },
]
}
)
end
end