forked from MarkUsProject/Markus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
executable file
·63 lines (51 loc) · 2.13 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
58
59
60
61
62
63
# This Vagrantfile is for development use only.
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-18.04"
config.vm.define :markus_box
config.vm.provider "virtualbox" do |vb|
# Uncomment the following line if you want a GUI.
# vb.gui = true
vb.name = "markus"
vb.memory = 2048
# Sync time every 5 seconds so code reloads properly
vb.customize ["guestproperty", "set", :id, "--timesync-threshold", 5000]
end
# Set this to your private key if you're having trouble
# ssh-ing into Vagrant (it's requiring a password)
# config.ssh.private_key_path = "/home/.ssh/id_rsa"
config.ssh.password = "vagrant"
# Allow instance to see project folder.
# Warning: This may cause problems with your Vagrant box!
# Enable at your own risk.
config.vm.synced_folder ".", "/home/vagrant/Markus", disabled: true
# Access the server running on port 3000 on the host on port 3000.
config.vm.network "forwarded_port", guest: 3000, host: 3000
# Webpack-dev-server listens on port 3035.
config.vm.network "forwarded_port", guest: 3035, host: 3035
# rq-dashboard
config.vm.network "forwarded_port", guest: 9181, host: 9181
# The autotesting server must be running when MarkUs populates the seed database
config.vm.provision "install-markus-autotesting", type: "shell" do |s|
s.path = "script/install-markus-autotesting.sh"
s.privileged = false
s.args = "~/markus-autotesting"
end
config.vm.provision "install-markus", type: "shell" do |s|
s.path = "script/install-markus.sh"
s.privileged = false
s.args = "~/Markus"
end
config.vm.provision "start-autotest-workers", type: "shell", run: "always" do |s|
s.path = "script/start-autotest-workers.sh"
s.privileged = false
s.args = "~/markus-autotesting"
end
config.vm.post_up_message =
<<~HEREDOC
markus_box is running! Test your installation by running
$ vagrant ssh -c markus
Then visit localhost:3000/csc108, and you should see the MarkUs login screen.
Login as an instructor with username 'a' and any non-empty password.
HEREDOC
end