Update changelog - http cloning is waaay faster now
[gitorious.git] / Vagrantfile
blob6dbb3bc59c8026312ae96a956328a535893a7556
1 # -*- mode: ruby -*-
2 # vi: set ft=ruby :
4 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5 VAGRANTFILE_API_VERSION = "2"
7 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
9   config.vm.provider :virtualbox do |vb, override|
10     override.vm.box = "ubuntu/trusty64"
11     override.vm.network :forwarded_port, guest: 80, host: 8080
12     override.vm.network :forwarded_port, guest: 443, host: 8443
13     override.vm.network :forwarded_port, guest: 3000, host: 3000
14     override.vm.synced_folder ".", "/vagrant", type: "nfs"
15     override.vm.network "private_network", ip: "10.5.7.5"
16     vb.memory = 2048
17     vb.cpus = 2
18     vb.customize ["modifyvm", :id, "--ioapic", "on"]
19   end
21   config.vm.provision :shell, inline: <<EOS
22     set -e
24     export DEBIAN_FRONTEND=noninteractive
26     apt-get update
28     apt-get install -y memcached redis-server mysql-server git \
29       build-essential libmysqlclient-dev libxml2-dev libxslt1-dev \
30       libreadline6 libicu-dev imagemagick nodejs mysql-client cmake \
31       pkg-config nginx
33     cd /tmp
34     wget -O ruby-install-0.4.3.tar.gz https://github.com/postmodern/ruby-install/archive/v0.4.3.tar.gz
35     tar -xzvf ruby-install-0.4.3.tar.gz
36     cd ruby-install-0.4.3/
37     make install
39     ruby-install -p https://gist.githubusercontent.com/plexus/10021261/raw/305492ebd17308e55eee1baab27568fafaa940cb/ruby-2.0-p451-readline.patch ruby 2.0
41     cd /tmp
42     wget -O chruby-0.3.8.tar.gz https://github.com/postmodern/chruby/archive/v0.3.8.tar.gz
43     tar -xzvf chruby-0.3.8.tar.gz
44     cd chruby-0.3.8/
45     make install
47     cat <<EOF >/etc/profile.d/chruby.sh
48 source /usr/local/share/chruby/chruby.sh
49 source /usr/local/share/chruby/auto.sh
50 EOF
53     cat <<EOF >/usr/bin/gitorious
54 #!/bin/bash
55 source /etc/profile.d/chruby.sh
56 cd /vagrant
57 exec bin/gitorious "$@"
58 EOF
60     chmod a+x /usr/bin/gitorious
61 EOS
63 end