-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathVagrantfile
More file actions
51 lines (44 loc) · 2.29 KB
/
Vagrantfile
File metadata and controls
51 lines (44 loc) · 2.29 KB
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
Vagrant.configure('2') do |config|
config.ssh.forward_agent = true
config.vm.box = 'cargomedia/debian-7-amd64-cm'
config.vm.hostname = 'www.admin-panel.dev'
if Vagrant.has_plugin? 'landrush'
config.landrush.enable
config.landrush.tld = 'dev'
config.landrush.host 'admin-panel.dev'
end
if Vagrant.has_plugin? 'vagrant-phpstorm-tunnel'
config.phpstorm_tunnel.project_home = '/home/vagrant/admin-panel'
end
synced_folder_type = ENV.fetch('SYNC_TYPE', 'nfs')
synced_folder_type = nil if 'vboxsf' == synced_folder_type
config.vm.network :private_network, ip: '10.10.10.30'
config.vm.network :public_network, :bridge => 'en0: Wi-Fi (AirPort)'
config.vm.synced_folder '.', '/home/vagrant/admin-panel', :type => synced_folder_type, :rsync__args => ["--verbose", "--archive", "--delete", "-z"]
config.vm.synced_folder '../feedify', '/home/vagrant/feedify', :type => synced_folder_type if Dir.exists? '../feedify'
config.vm.synced_folder '../api', '/home/vagrant/api', :type => synced_folder_type if Dir.exists? '../api'
config.vm.synced_folder '../scenario-engine', '/home/vagrant/scenario-engine', :type => synced_folder_type if Dir.exists? '../scenario-engine'
config.vm.synced_folder '../sdk-js', '/home/vagrant/sdk-js', :type => synced_folder_type if Dir.exists? '../sdk-js'
config.vm.synced_folder '../sdk-php', '/home/vagrant/sdk-php', :type => synced_folder_type if Dir.exists? '../sdk-php'
config.librarian_puppet.puppetfile_dir = 'puppet'
config.librarian_puppet.placeholder_filename = '.gitkeep'
config.librarian_puppet.resolve_options = {:force => true}
config.vm.provision :puppet do |puppet|
puppet.module_path = 'puppet/modules'
puppet.manifests_path = 'puppet/manifests'
end
config.vm.provision 'shell', run: 'always', inline: [
'cd /home/vagrant/admin-panel',
'composer --no-interaction install --dev',
].join(' && ')
config.vm.provision 'shell', run: 'always', inline: [
'cd /home/vagrant/admin-panel',
'cp resources/config/local.dev.php resources/config/local.php',
'bin/cm app set-deploy-version',
'bin/cm app setup',
'bin/cm db run-updates',
'sudo foreman-debian stop --app admin-panel',
'sudo foreman-debian install --app admin-panel --user root',
'sudo foreman-debian start --app admin-panel',
].join(' && ')
end