forked from Baljan/cafesys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
29 lines (26 loc) · 976 Bytes
/
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.network "forwarded_port", guest: 8000, host: 8000, host_ip: '127.0.0.1'
config.vm.provision "docker" do |d|
d.run "postgres", args: "-p 5432:5432 --env-file /vagrant/.env.docker.tmpl"
d.run "redis", args: "-p 6379:6379 --env-file /vagrant/.env.docker.tmpl"
end
config.vm.provision "shell", inline: <<-SHELL
add-apt-repository -y ppa:jonathonf/python-3.6
apt-get update
apt-get install -y python3.6 python3.6-dev python3-pip libpq-dev build-essential libssl-dev g++ libffi-dev python3-dev pypy glpk-utils
pip3 install virtualenv
cd /vagrant
cp -n .env.tmpl .env
mkdir /venv
chmod 777 /venv
virtualenv -p python3.6 /venv --always-copy
SHELL
config.vm.provision "shell", run: 'always', inline: <<-SHELL
cd /vagrant
source /venv/bin/activate
pip3 install -r requirements.txt
SHELL
end