source: src/webapp/apigility/Vagrantfile@ cb39a77

debian/bullseye
Last change on this file since cb39a77 was 74c3571, checked in by Joachim Langenbach <joachim.langenbach@…>, 8 years ago

Added gnuboat_mapservice:

it is a REST webservice designed with Apigility to allow the user to upload data, create waters and so on

  • Property mode set to 100644
File size: 1.8 KB
RevLine 
[74c3571]1# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
4VAGRANTFILE_API_VERSION = '2'
5
6@script = <<SCRIPT
7# Install dependencies
8apt-get update
9apt-get install -y apache2 git curl php7.0 php7.0-bcmath php7.0-bz2 php7.0-cli php7.0-curl php7.0-intl php7.0-json php7.0-mbstring php7.0-opcache php7.0-soap php7.0-sqlite3 php7.0-xml php7.0-xsl php7.0-zip libapache2-mod-php7.0
10
11# Configure Apache
12echo "<VirtualHost *:80>
13 DocumentRoot /var/www/public
14 AllowEncodedSlashes On
15
16 <Directory /var/www/public>
17 Options +Indexes +FollowSymLinks
18 DirectoryIndex index.php index.html
19 Order allow,deny
20 Allow from all
21 AllowOverride All
22 </Directory>
23
24 ErrorLog ${APACHE_LOG_DIR}/error.log
25 CustomLog ${APACHE_LOG_DIR}/access.log combined
26</VirtualHost>" > /etc/apache2/sites-available/000-default.conf
27a2enmod rewrite
28service apache2 restart
29
30if [ -e /usr/local/bin/composer ]; then
31 /usr/local/bin/composer self-update
32else
33 curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
34fi
35
36# Reset home directory of vagrant user
37if ! grep -q "cd /var/www" /home/vagrant/.profile; then
38 echo "cd /var/www" >> /home/vagrant/.profile
39fi
40
41echo "** [ZF] Run the following command to install dependencies, if you have not already:"
42echo " vagrant ssh -c 'composer install'"
43echo "** [ZF] Visit http://localhost:8080 in your browser for to view the application **"
44SCRIPT
45
46Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
47 config.vm.box = 'bento/ubuntu-16.04'
48 config.vm.network "forwarded_port", guest: 80, host: 8080
49 config.vm.synced_folder '.', '/var/www', owner: "www-data", group: "www-data"
50 config.vm.provision 'shell', inline: @script
51
52 config.vm.provider "virtualbox" do |vb|
53 vb.customize ["modifyvm", :id, "--memory", "1024"]
54 vb.customize ["modifyvm", :id, "--name", "Apigility - Ubuntu 16.04"]
55 end
56end
Note: See TracBrowser for help on using the repository browser.