This repository has been archived by the owner on Jul 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vagrantfile
56 lines (45 loc) · 1.75 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty64"
# Enable NFS access to the disk
config.vm.synced_folder ".", "/vagrant", :nfs => true
# Speed up DNS lookups
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--natdnsproxy1", "off"]
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "off"]
end
# NFS requires a host-only network
# This also allows you to test via other devices (e.g. mobiles) on the same
# network
config.vm.network :private_network, ip: "10.11.12.13"
# Django dev server
config.vm.network "forwarded_port", guest: 4000, host: 4000
config.vm.network "forwarded_port", guest: 1080, host: 1080
# Give the VM a bit more power to speed things up
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2
end
# Provision the vagrant box
config.vm.provision "shell", inline: <<-SHELL
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get -y install build-essential libssl-
sudo apt-get -y install ruby2.4 ruby2.4-dev make gcc nodejs npm
gem install jekyll bundler
cd /vagrant
bundle install
npm install
#fix dpkg-preconfigure error
export DEBIAN_FRONTEND=noninteractive
# Run post-deploy actions script to update the virtualenv, install the
# python packages we need, migrate the db and generate the sass etc
#conf/post_deploy_actions.bash
SHELL
end