-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathVagrantfile
More file actions
33 lines (28 loc) · 1.12 KB
/
Vagrantfile
File metadata and controls
33 lines (28 loc) · 1.12 KB
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network :forwarded_port, guest: 80, host: 10180
# set a different SSH port so as not to conflict with the server repo
config.vm.network :forwarded_port, guest: 22, host: 2322, id: "ssh"
config.ssh.port = 2322
config.vm.provision 'shell', inline: <<-SHELL
apt-get update
apt-get install -y nginx build-essential npm
# this config change prevents improper caching
# https://jeremyfelt.com/2013/01/08/clear-nginx-cache-in-vagrant/
sed -i 's/sendfile on/sendfile off/g' /etc/nginx/nginx.conf
/etc/init.d/nginx restart
# the following line makes node.js available at "node", instead of just "nodejs"
update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
npm install -g less requirejs
rm -rf /usr/share/nginx/html
ln -fs /vagrant /usr/share/nginx/html
SHELL
config.vm.provision 'shell', privileged: false, inline: <<-SHELL
cd /vagrant
cp scripts/config.js.vagrant scripts/config.js
make build
echo "Your ARIS editor is ready!"
SHELL
end