forked from wooyek/flask-social-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Vagrantfile
50 lines (41 loc) · 1.83 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
sudo apt-get update
sudo apt-get install -y python-dev python-pip
sudo apt-get install -y mongodb
sudo apt-get install -y git unzip
sudo pip install virtualenv
sudo pip install virtualenvwrapper
echo "export WORKON_HOME=/home/vagrant/.virtualenvs" >> /home/vagrant/.bashrc
echo "source /usr/local/bin/virtualenvwrapper.sh" >> /home/vagrant/.bashrc
export WORKON_HOME=/home/vagrant/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
echo "Setting up virtual environments"
mkvirtualenv dev
/home/vagrant/.virtualenvs/dev/bin/pip install -r /vagrant/requirements.txt
/home/vagrant/.virtualenvs/vde/bin/pip install -r /vagrant/requirements-dev.txt
echo "Setting up sqla example environment"
mkvirtualenv sqla
/home/vagrant/.virtualenvs/sqla/bin/pip install -r /vagrant/example/sqla/requirements.txt
echo "Setting up mongodb example environment"
mkvirtualenv mongodb
/home/vagrant/.virtualenvs/mongodb/bin/pip install -r /vagrant/example/mongodb/requirements.txt
echo "Setting up gae example environment"
mkvirtualenv gae
/home/vagrant/.virtualenvs/gae/bin/pip install --target=/vagrant/example/gae/lib -r /vagrant/example/gae/requirements.txt
wget https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.17.zip
unzip google_appengine_1.9.17.zip
chown -R vagrant:vagrant /home/vagrant/.virtualenvs
SCRIPT
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision "shell", inline: $script
config.vm.network "private_network", ip: "192.168.113.4"
config.vm.network "forwarded_port", host_ip: "127.0.0.1", host: 5055, guest: 5055
config.vm.synced_folder "example/gae/lib", "/vagrant/example/gae/lib", disabled: true
config.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
end
end