summaryrefslogtreecommitdiff
path: root/Vagrantfile
blob: ced296a1254ed0cf0035fa4deaaa95f98dd2bb7f (plain)
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
# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = "2"

$script = <<SCRIPT
# install packages
apt-get update
apt-get install -y apache2 php5 libapache2-mod-php5 php5-sqlite php5-ldap php5-xdebug php5-curl php5-mysql php5-pgsql
service apache2 restart
rm -f /var/www/html/index.html
date > /etc/vagrant_provisioned_at
echo "Go to http://localhost:8080/ (admin/admin) !"
SCRIPT

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

  # Virtualbox
  config.vm.provider "virtualbox" do |v|
    v.memory = 1024
  end

  # Image
  config.vm.box = "ubuntu/trusty64"
  config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"

  # Network
  config.vm.network :forwarded_port, guest: 80, host: 8080
  #config.vm.network "public_network", :bridge => "en0: Wi-Fi (AirPort)"

  # Setup
  config.vm.provision "shell", inline: $script
  config.vm.synced_folder ".", "/var/www/html", owner: "www-data", group: "www-data"
end