|
1 | 1 | # -*- mode: ruby -*- |
2 | 2 | # vi: set ft=ruby : |
3 | 3 |
|
4 | | -VAGRANTFILE_API_VERSION = "2" |
5 | | - |
6 | | -Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| |
7 | | - config.vm.provision "shell", path: "pg_config.sh" |
8 | | - config.vm.box = "ubuntu/trusty32" |
| 4 | +Vagrant.configure("2") do |config| |
| 5 | + config.vm.box = "ubuntu/xenial32" |
9 | 6 | config.vm.network "forwarded_port", guest: 8000, host: 8000 |
10 | 7 | config.vm.network "forwarded_port", guest: 8080, host: 8080 |
11 | 8 | config.vm.network "forwarded_port", guest: 5000, host: 5000 |
| 9 | + config.vm.provision "shell", inline: <<-SHELL |
| 10 | + apt-get update |
| 11 | + apt-get upgrade |
| 12 | + apt-get -qqy install make python3-pip |
| 13 | + apt-get -qqy install postgresql |
| 14 | + pip3 install --upgrade pip |
| 15 | + pip3 install flask packaging oauth2client redis passlib flask-httpauth |
| 16 | + pip3 install sqlalchemy flask-sqlalchemy psycopg2 bleach |
| 17 | + su postgres -c 'createuser -dRS ubuntu' |
| 18 | + su ubuntu -c 'createdb' |
| 19 | + su ubuntu -c 'createdb forum' |
| 20 | + su ubuntu -c 'psql forum -f /vagrant/forum/forum.sql' |
| 21 | +
|
| 22 | + vagrantTip="[35m[1mThe shared directory is located at /vagrant\\nTo access your shared files: cd /vagrant[m" |
| 23 | + echo -e $vagrantTip > /etc/motd |
| 24 | +
|
| 25 | + wget http://download.redis.io/redis-stable.tar.gz |
| 26 | + tar xvzf redis-stable.tar.gz |
| 27 | + cd redis-stable |
| 28 | + make |
| 29 | + make install |
| 30 | + SHELL |
12 | 31 | end |
0 commit comments