2 $script_sqlite = <<SCRIPT
4 apt-get install -y apache2 php5 php5-sqlite php5-xdebug
6 echo "ServerName localhost" >> /etc/apache2/apache2.conf
7 service apache2 restart
8 rm -f /var/www/html/index.html
9 date > /etc/vagrant_provisioned_at
12 $script_mysql = <<SCRIPT
13 export DEBIAN_FRONTEND=noninteractive
15 apt-get install -y apache2 php5 php5-mysql php5-xdebug mysql-server mysql-client
17 echo "ServerName localhost" >> /etc/apache2/apache2.conf
18 service apache2 restart
20 echo "create database wallabag;" | mysql -u root
21 rm -f /var/www/html/index.html
22 date > /etc/vagrant_provisioned_at
25 $script_postgres = <<SCRIPT
26 export DEBIAN_FRONTEND=noninteractive
28 apt-get install -y apache2 php5 php5-pgsql php5-xdebug postgresql postgresql-contrib
30 echo "ServerName localhost" >> /etc/apache2/apache2.conf
31 service apache2 restart
32 service postgresql restart
33 rm -f /var/www/html/index.html
34 date > /etc/vagrant_provisioned_at
37 Vagrant.configure("2") do |config|
39 config.vm.define "sqlite" do |m|
40 m.vm.box = "ubuntu/trusty64"
41 m.vm.provision "shell", inline: $script_sqlite
42 m.vm.synced_folder ".", "/var/www/html", owner: "www-data", group: "www-data"
45 config.vm.define "mysql" do |m|
46 m.vm.box = "ubuntu/trusty64"
47 m.vm.provision "shell", inline: $script_mysql
48 m.vm.synced_folder ".", "/var/www/html", owner: "www-data", group: "www-data"
51 config.vm.define "postgres" do |m|
52 m.vm.box = "ubuntu/trusty64"
53 m.vm.provision "shell", inline: $script_postgres
54 m.vm.synced_folder ".", "/var/www/html", owner: "www-data", group: "www-data"
57 config.vm.define "debian7" do |m|
58 m.vm.box = "chef/debian-7.6"
59 m.vm.provision "shell", inline: $script_sqlite
60 m.vm.synced_folder ".", "/var/www", owner: "www-data", group: "www-data"
63 config.vm.define "debian6" do |m|
64 m.vm.box = "chef/debian-6.0.10"
65 m.vm.provision "shell", inline: $script_sqlite
66 m.vm.synced_folder ".", "/var/www", owner: "www-data", group: "www-data"
69 config.vm.network :forwarded_port, guest: 80, host: 8003
70 #config.vm.network "public_network", :bridge => "en0: Wi-Fi (AirPort)"