-
Notifications
You must be signed in to change notification settings - Fork 1
/
Vagrantfile
34 lines (26 loc) · 1.53 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |django_config|
# Every Vagrant virtual environment requires a box to build off of.
django_config.vm.box = "trusty64"
# The URL from where the 'django_config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
django_config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
# Configure virtual machine specs. Keep it simple, single user.
django_config.vm.provider :virtualbox do |p|
p.customize ["modifyvm", :id, "--memory", 2048]
p.customize ["modifyvm", :id, "--cpus", 2]
p.customize ["modifyvm", :id, "--cpuexecutioncap", 50]
end
# Configure a synced folder between HOST and GUEST
django_config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", :mount_options => ["dmode=777","fmode=777"]
# Config hostname and IP address so entry can be added to HOSTS file
django_config.vm.hostname = "vagrant-env.be"
django_config.vm.network :private_network, ip: '192.168.99.100'
# Forward a port from the guest to the host, which allows for outside
# computers to access the VM, whereas host only networking does not.
django_config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
django_config.vm.network "forwarded_port", guest: 8000, host: 8000, host_ip: "127.0.0.1"
# kickoff a shell script to install Python essentials
django_config.vm.provision :shell, path: "vagrant_bootstrap.sh"
end