-
Notifications
You must be signed in to change notification settings - Fork 2
/
Vagrantfile
47 lines (38 loc) · 1.53 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/xenial64"
# Network configuration
config.vm.network "forwarded_port", guest: 5000, host: 5000, host_ip: "127.0.0.1"
config.vm.network "private_network", ip: "192.168.33.10"
# hack for Windows users to not set the execute bits on all files
config.vm.synced_folder "./", "/vagrant", owner: "vagrant", mount_options: ["dmode=775,fmode=664"]
# Provider-specific configuration
config.vm.provider "virtualbox" do |vb|
# Customize the amount of memory on the VM:
vb.memory = "512"
vb.cpus = 1
end
# Copy your .gitconfig file so that your git credentials are correct
if File.exists?(File.expand_path("~/.gitconfig"))
config.vm.provision "file", source: "~/.gitconfig", destination: "~/.gitconfig"
end
# Copy your private ssh keys to use with github
if File.exists?(File.expand_path("~/.ssh/id_rsa"))
config.vm.provision "file", source: "~/.ssh/id_rsa", destination: "~/.ssh/id_rsa"
end
# Provision a Python environment
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y git python-pip python-dev
apt-get -y autoremove
pip install --upgrade pip
# Install app dependencies
cd /vagrant
pip install -r requirements.txt
SHELL
end