forked from OmniDB/OmniDB
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
36 lines (32 loc) · 972 Bytes
/
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 :
$script = <<SCRIPT
echo "I am provisioning..."
apt-get update
wget -q https://omnidb.org/dist/2.7.0/omnidb-server_2.7.0-debian-amd64.deb
dpkg -i omnidb-server_2.7.0-debian-amd64.deb
cat > /etc/systemd/system/omnidb.service << EOF
[Unit]
After=network.target
[Service]
ExecStart=/opt/omnidb-server/omnidb-server
[Install]
WantedBy=default.target
EOF
chmod 664 /etc/systemd/system/omnidb.service
systemctl daemon-reload
systemctl enable omnidb.service
systemctl start omnidb.service
date > /etc/vagrant_provisioned_at
echo "OmniDB is running on localhost:8000"
SCRIPT
Vagrant.configure("2") do |config|
config.vm.provision "shell", inline: $script
config.vm.box = "debian/stretch64"
config.vm.box_url = "https://app.vagrantup.com/debian/boxes/stretch64"
config.vm.host_name = "omnidb"
config.vm.provider :virtualbox do |vb|
vb.name = "omnidb"
end
config.vm.network "forwarded_port", guest: 8000, host: 8000
end