-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
executable file
·69 lines (55 loc) · 2.65 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
64
65
66
67
68
69
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# sgl adds, see
# https://cloud.centos.org/centos/7/vagrant/x86_64/images/
config.vm.box = "ohif-vagrant"
config.vm.hostname = "ohif"
config.vm.box_url = "https://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7-x86_64-Vagrant-1809_01.VirtualBox.box"
# make a second hard disk https://gist.github.com/leifg/4713995
# https://realworlditblog.wordpress.com/2016/09/23/vagrant-tricks-add-extra-disk-to-box/
file_to_disk = './data.vmdk'
config.vm.provider :virtualbox do | vb |
unless File.exist?(file_to_disk)
vb.customize ['createhd', '--filename', file_to_disk, '--size', 50 * 1024]
end
vb.customize ['storageattach', :id, '--storagectl', 'IDE', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
# Port forwarding - uncomment the items below you will actually use
# (as dictated by what is selected to install in the install.sh )
# ssh port - not needed, Vagrant does by default
#config.vm.network "forwarded_port", guest: 22, host: 2223
# host ip = 10.0.2.2
# first guest ip = 10.0.2.15
# for ohif (the good folks at OHIF were kind enough not to mention 80 and 443)
config.vm.network "forwarded_port", guest: 3000, host: 3000
# config.vm.network "forwarded_port", guest: 80, host: 8000
# config.vm.network "forwarded_port", guest: 443, host: 4430
# for orthanc (8042 for GUI and REST, 4242 for DICOM)
config.vm.network "forwarded_port", guest: 8042, host: 8042
config.vm.network "forwarded_port", guest: 4242, host: 4242
# for VM postgres
# https://github.com/jackdb/pg-app-dev-vm/tree/master/Vagrant-setup
# https://wiki.postgresql.org/wiki/PostgreSQL_For_Development_With_Vagrant#Linux_Installation
config.vm.network "forwarded_port", guest: 5432, host: 5433, protocol: "tcp"
#for RDP session -
#config.vm.network "forwarded_port", guest: 3389, host: 2179
#config.vm.provider :virtualbox do |vb|
# vb.gui = true
#end
config.vm.provider "vmware" do |vb|
# stub for now
end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# apt-get update
# apt-get install -y apache2
# SHELL
config.vm.provision "shell", path: "install.sh"
end