4 # Config Github Settings
5 github_username = "fideloper"
6 github_repo = "Vaprobash"
7 github_branch = "1.0.0"
8 github_url = "https://raw.githubusercontent.com/#{github_username}/#{github_repo}/#{github_branch}"
10 # Server Configuration
12 hostname = "vaprobash.dev"
14 # Set a local private network IP address.
15 # See http://en.wikipedia.org/wiki/Private_network for explanation
16 # You can use the following IP ranges:
17 # 10.0.0.1 - 10.255.255.254
18 # 172.16.0.1 - 172.31.255.254
19 # 192.168.0.1 - 192.168.255.254
20 server_ip = "192.168.22.10"
21 server_memory = "384" # MB
22 server_swap = "768" # Options: false | int (MB) - Guideline: Between one or two times the server_memory
23 server_timezone = "UTC"
25 # Database Configuration
26 mysql_root_password = "root" # We'll assume user "root"
27 mysql_version = "5.5" # Options: 5.5 | 5.6
28 mysql_enable_remote = "false" # remote access enabled when true
29 pgsql_root_password = "root" # We'll assume user "root"
31 # Languages and Packages6
32 ruby_version = "latest" # Choose what ruby version should be installed (will also be the default version)
33 ruby_gems = [ # List any Ruby Gems that you want to install
39 # To install HHVM instead of PHP, set this to "true"
43 composer_packages = [ # List any global Composer packages that you want to install
44 #"phpunit/phpunit:4.0.*",
45 #"codeception/codeception=*",
46 #"phpspec/phpspec:2.0.*@dev",
47 #"squizlabs/php_codesniffer:1.5.*",
50 # Default web server document root
51 # Symfony's public directory is assumed "web"
52 # Laravel's public directory is assumed "public"
53 public_folder = "/vagrant"
55 laravel_root_folder = "/vagrant/laravel" # Where to install Laravel. Will `composer install` if a composer.json file exists
56 laravel_version = "latest-stable" # If you need a specific version of Laravel, set it here
57 symfony_root_folder = "/vagrant/symfony" # Where to install Symfony.
59 nodejs_version = "latest" # By default "latest" will equal the latest stable version
60 nodejs_packages = [ # List any global NodeJS packages that you want to install
67 Vagrant.configure("2") do |config|
69 # Set server to Ubuntu 14.04
70 config.vm.box = "ubuntu/trusty64"
72 # Create a hostname, don't forget to put it to the `hosts` file
73 # This will point to the server's default virtual host
74 # TO DO: Make this work with virtualhost along-side xip.io URL
75 config.vm.hostname = hostname
78 config.vm.network :private_network, ip: server_ip
81 config.vm.provider :virtualbox do |vb|
84 vb.customize ["modifyvm", :id, "--memory", server_memory]
86 # Set the timesync threshold to 10 seconds, instead of the default 20 minutes.
87 # If the clock gets more than 15 minutes out of sync (due to your laptop going
88 # to sleep for instance, then some 3rd party services will reject requests.
89 vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000]
91 # Prevent VMs running on Ubuntu to lose internet connection
92 # vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
93 # vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
97 # If using VMWare Fusion
98 config.vm.provider "vmware_fusion" do |vb, override|
99 override.vm.box_url = "http://files.vagrantup.com/precise64_vmware.box"
102 vb.vmx["memsize"] = server_memory
106 # If using Vagrant-Cachier
107 # http://fgrehm.viewdocs.io/vagrant-cachier
108 if Vagrant.has_plugin?("vagrant-cachier")
109 # Configure cached packages to be shared between instances of the same base box.
110 # Usage docs: http://fgrehm.viewdocs.io/vagrant-cachier/usage
111 config.cache.scope = :box
113 config.cache.synced_folder_opts = {
115 mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
123 # Provision Base Packages
124 config.vm.provision "shell", path: "#{github_url}/scripts/base.sh", args: [github_url, server_swap]
127 config.vm.provision "shell", path: "#{github_url}/scripts/php.sh", args: [server_timezone, hhvm]
129 # Enable MSSQL for PHP
130 # config.vm.provision "shell", path: "#{github_url}/scripts/mssql.sh"
133 # config.vm.provision "shell", path: "#{github_url}/scripts/vim.sh", args: github_url
140 # Provision Apache Base
141 config.vm.provision "shell", path: "#{github_url}/scripts/apache.sh", args: [server_ip, public_folder, hostname, github_url]
143 # Provision Nginx Base
144 # config.vm.provision "shell", path: "#{github_url}/scripts/nginx.sh", args: [server_ip, public_folder, hostname, github_url]
152 config.vm.provision "shell", path: "#{github_url}/scripts/mysql.sh", args: [mysql_root_password, mysql_version, mysql_enable_remote]
154 # Provision PostgreSQL
155 # config.vm.provision "shell", path: "#{github_url}/scripts/pgsql.sh", args: pgsql_root_password
158 # config.vm.provision "shell", path: "#{github_url}/scripts/sqlite.sh"
160 # Provision RethinkDB
161 # config.vm.provision "shell", path: "#{github_url}/scripts/rethinkdb.sh", args: pgsql_root_password
163 # Provision Couchbase
164 # config.vm.provision "shell", path: "#{github_url}/scripts/couchbase.sh"
167 # config.vm.provision "shell", path: "#{github_url}/scripts/couchdb.sh"
170 # config.vm.provision "shell", path: "#{github_url}/scripts/mongodb.sh"
173 # config.vm.provision "shell", path: "#{github_url}/scripts/mariadb.sh", args: [mysql_root_password, mysql_enable_remote]
179 # Install Elasticsearch
180 # config.vm.provision "shell", path: "#{github_url}/scripts/elasticsearch.sh"
182 # Install SphinxSearch
183 # config.vm.provision "shell", path: "#{github_url}/scripts/sphinxsearch.sh"
186 # Search Server Administration (web-based)
190 # Admin for: Elasticsearch
191 # Works on: Apache2, Nginx
192 # config.vm.provision "shell", path: "#{github_url}/scripts/elastichq.sh"
200 # config.vm.provision "shell", path: "#{github_url}/scripts/memcached.sh"
202 # Provision Redis (without journaling and persistence)
203 # config.vm.provision "shell", path: "#{github_url}/scripts/redis.sh"
205 # Provision Redis (with journaling and persistence)
206 # config.vm.provision "shell", path: "#{github_url}/scripts/redis.sh", args: "persistent"
207 # NOTE: It is safe to run this to add persistence even if originally provisioned without persistence
215 # config.vm.provision "shell", path: "#{github_url}/scripts/beanstalkd.sh"
217 # Install Heroku Toolbelt
218 # config.vm.provision "shell", path: "https://toolbelt.heroku.com/install-ubuntu.sh"
220 # Install Supervisord
221 # config.vm.provision "shell", path: "#{github_url}/scripts/supervisord.sh"
224 # Additional Languages
228 # config.vm.provision "shell", path: "#{github_url}/scripts/nodejs.sh", privileged: false, args: nodejs_packages.unshift(nodejs_version, github_url)
230 # Install Ruby Version Manager (RVM)
231 # config.vm.provision "shell", path: "#{github_url}/scripts/rvm.sh", privileged: false, args: ruby_gems.unshift(ruby_version)
234 # Frameworks and Tooling
238 # config.vm.provision "shell", path: "#{github_url}/scripts/composer.sh", privileged: false, args: composer_packages.join(" ")
241 # config.vm.provision "shell", path: "#{github_url}/scripts/laravel.sh", privileged: false, args: [server_ip, laravel_root_folder, public_folder, laravel_version]
244 # config.vm.provision "shell", path: "#{github_url}/scripts/symfony.sh", privileged: false, args: [server_ip, symfony_root_folder, public_folder]
247 # config.vm.provision "shell", path: "#{github_url}/scripts/screen.sh"
249 # Install config Mailcatcher
250 # config.vm.provision "shell", path: "#{github_url}/scripts/mailcatcher.sh"
253 # config.vm.provision "shell", path: "#{github_url}/scripts/git-ftp.sh", privileged: false
257 # Any local scripts you may want to run post-provisioning.
258 # Add these to the same directory as the Vagrantfile.
260 config.vm.provision "shell", path: "./util/vagrant_provision.sh"
261 config.vm.synced_folder "./", "/vagrant/", :owner=> 'www-data', :group=>'vagrant', :mount_options => ['dmode=775', 'fmode=775']