2016-03-23 18:39:41 +01:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
2018-02-14 19:35:08 +01:00
|
|
|
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
|
|
|
VAGRANTFILE_API_VERSION = '2'
|
|
|
|
|
|
|
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
|
|
config.vm.box = 'ubuntu/xenial64'
|
|
|
|
config.vm.define 'fabmanager-devbox'
|
|
|
|
|
|
|
|
# Port forwarding
|
|
|
|
[
|
|
|
|
3000, # rails/puma
|
|
|
|
9200, # elasticsearch
|
|
|
|
5432, # postgres
|
|
|
|
1080, # mailcatcher web ui
|
|
|
|
4040 # ngrok web ui
|
|
|
|
].each do |port|
|
|
|
|
config.vm.network "forwarded_port", guest: port, host: port
|
|
|
|
end
|
2016-03-23 18:39:41 +01:00
|
|
|
|
2018-02-14 19:35:08 +01:00
|
|
|
# Provider-specific configuration
|
|
|
|
config.vm.provider 'virtualbox' do |vb|
|
2018-02-15 18:31:36 +01:00
|
|
|
vb.customize ['modifyvm', :id, '--memory', '2048']
|
2018-02-14 19:35:08 +01:00
|
|
|
end
|
2016-03-23 18:39:41 +01:00
|
|
|
|
2018-02-14 19:35:08 +01:00
|
|
|
# If you are using Windows o Linux with an encrypted volume
|
|
|
|
config.vm.synced_folder '.', '/vagrant', type: 'virtualbox'
|
2016-03-23 18:39:41 +01:00
|
|
|
|
2018-02-14 19:35:08 +01:00
|
|
|
# Provisioning
|
2018-02-27 01:18:24 +01:00
|
|
|
config.vm.provision "shell", privileged: true, run: "once" do |s|
|
2018-02-14 19:35:08 +01:00
|
|
|
s.inline = "export LC_ALL=en_US.UTF-8\n" \
|
|
|
|
"export LANG=en_US.UTF-8\n" \
|
|
|
|
"export LANGUAGE=en_US.UTF-8"
|
2016-03-23 18:39:41 +01:00
|
|
|
end
|
|
|
|
|
2018-02-14 19:35:08 +01:00
|
|
|
config.vm.provision "shell", privileged: false, run: "once",
|
|
|
|
path: "provision/zsh_setup.sh"
|
|
|
|
config.vm.provision "shell", privileged: false, run: "once",
|
|
|
|
path: "provision/box_setup.zsh"
|
2016-03-23 18:39:41 +01:00
|
|
|
end
|