remove the second box from the vagrantfile

The second box isn't needed for this project. I therefore removed it. I
just add it for testing.
This commit is contained in:
Andreas Zweili 2017-10-08 19:25:25 +02:00
parent 2e7077e92e
commit 9d24430d2e
1 changed files with 14 additions and 31 deletions

45
Vagrantfile vendored
View File

@ -3,40 +3,23 @@
BOX_IMAGE = "debian/stretch64"
Vagrant.configure("2") do |config|
config.vm.define "web" do |subconfig|
subconfig.vm.box = BOX_IMAGE
subconfig.vm.hostname = "web"
subconfig.vm.network "forwarded_port", guest: 80, host: 8080
subconfig.vm.network "private_network", type: "dhcp"
subconfig.vm.provision "shell", inline: <<-SHELL
DEBIAN_FRONTEND=noninteractive
apt-get install -y php7.0 php7.0-mysql php7.0-xml mariadb-server
phpenmod mysqli
mysql < /vagrant/sql/remove_db.sql
mysql < /vagrant/sql/create_db.sql
mysql < /vagrant/sql/add_data.sql
if ! [ -L /var/www/html ]; then
rm -rf /var/www/html
ln -s /vagrant /var/www/html
fi
SHELL
end
config.vm.box = BOX_IMAGE
config.vm.hostname = "webtech"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "private_network", type: "dhcp"
config.vm.define "resources" do |subconfig|
subconfig.vm.box = BOX_IMAGE
subconfig.vm.hostname = "resources"
subconfig.vm.network "private_network", type: "dhcp"
subconfig.vm.provision "shell", inline: <<-SHELL
apt-get install -y git
SHELL
end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y apache2 avahi-daemon libnss-mdns
apt-get install -y apache2 php7.0 php7.0-mysql php7.0-xml mariadb-server avahi-daemon libnss-mdns
phpenmod mysqli
mysql < /vagrant/sql/remove_db.sql
mysql < /vagrant/sql/create_db.sql
mysql < /vagrant/sql/add_data.sql
if ! [ -L /var/www/html ]; then
rm -rf /var/www/html
ln -s /vagrant /var/www/html
fi
SHELL
end