-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathVagrantfile
53 lines (37 loc) · 1.93 KB
/
Vagrantfile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "debian/bullseye64"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.provision "shell", inline: <<-SHELL
export APACHE_DOCUMENT_ROOT=/usr/share/multi-abraflexi-setup/
export DEBIAN_FRONTEND=noninteractive
apt install lsb-release wget
echo "deb https://repo.vitexsoftware.cz $(lsb_release -sc) main backports" | tee /etc/apt/sources.list.d/vitexsoftware.list
wget -O /etc/apt/trusted.gpg.d/vitexsoftware.gpg https://repo.vitexsoftware.cz/keyring.gpg
echo "deb [trusted=yes] file:///vagrant/deb ./" > /etc/apt/sources.list.d/local.list
apt-get update
apt-get install -y apache2 libapache2-mod-php
#apt -y install multi-abraflexi-setup-sqlite
apt -y install mariadb-server
systemctl start mysql
apt -y install multi-abraflexi-setup-mysql
phinx seed:run -c /usr/lib/multi-abraflexi-setup/phinx-adapter.php
a2enconf multi-abraflexi-setup
echo ServerName MultiAbraFlexi >> /etc/apache2/apache2.conf
#sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
#sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
export DEBCONF_DEBUG=developer
#apt -y install abraflexi-matcher abraflexi-reminder abraflexi-contract-invoices abraflexi-digest
apt -y install php-tools php-xdebug
echo "xdebug.force_display_errors = 1" >> /etc/php/*/cli/conf.d/20-xdebug.ini
echo "xdebug.mode=develop" >> /etc/php/*/cli/conf.d/20-xdebug.ini
php-devconf
phpenmod xdebug
echo '<a href="multi-abraflexi-setup?login=demo&password=demo">Multi AbraFlexi Setup</a><?php phpinfo();' > /var/www/html/index.php
rm -rf /var/www/html/index.html
apache2ctl restart
apt-get -y install links
links -dump http://localhost/multi-abraflexi-setup
SHELL
end