-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathVagrantfile
More file actions
65 lines (47 loc) · 1.86 KB
/
Copy pathVagrantfile
File metadata and controls
65 lines (47 loc) · 1.86 KB
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
57
58
59
60
61
62
63
64
65
# -*- mode: ruby -*-
# vi: set ft=ruby :
# bootstrap script partially copied from https://github.com/Lukx/vagrant-lamp
$script = <<SCRIPT
locale-gen ru_RU.UTF-8
dpkg-reconfigure locales
apt-get update
apt-get -y install git mc golang
apt-get -y install postgresql postgresql-contrib
apt-get -y install nodejs npm
ln -s /usr/bin/nodejs /usr/bin/node
npm install bower -g
npm install gulp -g
mkdir -p /home/vagrant/src/github.com/advmaker/hackaton
export GOPATH=/home/vagrant
export PATH="$PATH:/home/vagrant/bin"
export PORT=8000
export PGHOST=/var/run/postgresql
echo 'export GOPATH=/home/vagrant' >> /home/vagrant/.bash_profile
echo 'export PATH="$PATH:/home/vagrant/bin"' >> /home/vagrant/.bash_profile
cd /opt/
git clone https://github.com/pote/gpm.git && cd /opt/gpm
./configure
make install
cd /opt/
git clone https://github.com/pote/gvp.git && cd /opt/gvp
./configure
make install
go get github.com/go-martini/martini
chown -R vagrant:vagrant /home/vagrant
mkdir -p /usr/local/pgsql/data
chown postgres:postgres /usr/local/pgsql/data/
sudo -u postgres /usr/lib/postgresql/9.3/bin/initdb -D /usr/local/pgsql/data
su postgres;psql -c 'CREATE USER vagrant WITH PASSWORD \'vagrant\''; psql -c 'CREATE DATABASE achievements_db;'
SCRIPT
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.100.100"
config.vm.synced_folder "./", "/home/vagrant/src/github.com/advmaker/hackaton"
config.vm.provider "virtualbox" do |v|
v.name = "hackaton_vm" # PROJECT NAME PUT HERE
end
# provisioner config
config.vm.provision "shell", inline: $script
end