-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
71 lines (52 loc) · 2.1 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
70
71
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
# This file is part of webtoolsnz\smartcities-dashboard
#
# @copyright Copyright (c) 2017 Webtools Ltd
# @license http://opensource.org/licenses/MIT
# @link https://github.com/webtoolsnz/smartcities-dashboard
# @package webtoolsnz/smartcities-dashboard
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
hostname = "smartcities-dashboard.dev"
server_ip = "192.168.99.234"
server_timezone = "Pacific/Auckland"
php_timezone = "Pacific/Auckland"
mysql_root_password = "root"
db_name = "dash"
db_user = "dash_u"
db_pass = "dash_p"
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.box_check_update = false
config.vm.hostname = hostname
# Create a static IP
config.vm.network :private_network, ip: server_ip
# Use NFS for the shared folder
config.vm.synced_folder ".", "/vagrant/www",
id: "core",
:nfs => true,
:mount_options => ['nolock,vers=3,udp,noatime'],
:linux__nfs_options => ['no_root_squash']
# If using VirtualBox
config.vm.provider :virtualbox do |vb|
vb.name = hostname
# Set server cpus
vb.customize ["modifyvm", :id, "--cpus", 1]
# Set server memory
vb.customize ["modifyvm", :id, "--memory", 1024]
# Set the timesync threshold to 10 seconds, instead of the default 20 minutes.
# If the clock gets more than 15 minutes out of sync (due to your laptop going
# to sleep for instance, then some 3rd party services will reject requests.
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000]
# Prevent VMs running on Ubuntu to lose internet connection
# vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
# vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
#config.vm.provision "shell", inline <<-SHELL
# SHELL
config.vm.provision "shell", path: "./vagrant/provision.sh", args: [hostname, server_timezone, php_timezone, mysql_root_password, db_name, db_user, db_pass]
end