aboutsummaryrefslogtreecommitdiffstats
path: root/vagrant
diff options
context:
space:
mode:
authorMaat <maat-pub@mageia.biz>2020-05-09 01:15:08 +0200
committerMaat <maat-pub@mageia.biz>2020-05-09 01:15:08 +0200
commit6985226b17e8a0ef0a720bf1d12fe0c216e13dab (patch)
tree116d2565ac02c40abe0548863c6badf8ec3e1d1e /vagrant
parent8ea437e30605e0f66b5220bf904a61d7c1d11ddd (diff)
parent8d00784dfe2c8bcb10843ff70b4cfa998d703285 (diff)
downloadforums-master.tar
forums-master.tar.gz
forums-master.tar.bz2
forums-master.tar.xz
forums-master.zip
Merge remote-tracking branch 'upstream/prep-release-3.3.0'HEADmaster
Diffstat (limited to 'vagrant')
-rwxr-xr-xvagrant/after.sh28
-rw-r--r--vagrant/bootstrap.yaml6
2 files changed, 18 insertions, 16 deletions
diff --git a/vagrant/after.sh b/vagrant/after.sh
index aadb7e7492..5980e5c334 100755
--- a/vagrant/after.sh
+++ b/vagrant/after.sh
@@ -1,33 +1,37 @@
#!/bin/sh
+PHP_VERSION="7.2"
PHPBB_PATH="/home/vagrant/phpbb"
PHPBB_CONFIG="${PHPBB_PATH}/phpBB/config.php"
PHPBB_INSTALL="${PHPBB_PATH}/vagrant/phpbb-install-config.yml"
# Ensure composer deps are installed
cd ${PHPBB_PATH}/phpBB
-php ../composer.phar install
+php${PHP_VERSION} ../composer.phar install
-# Backup current config.php file
+# Backup and remove current config.php file
if [ -e ${PHPBB_CONFIG} ]
then
cp --backup=numbered ${PHPBB_CONFIG} ${PHPBB_CONFIG}.bak
+ rm -rf ${PHPBB_CONFIG}
fi
-# Delete any sqlite db and config file
-rm -rf /tmp/phpbb.sqlite3
-rm -rf ${PHPBB_CONFIG}
-
# Install phpBB
-php ${PHPBB_PATH}/phpBB/install/phpbbcli.php install ${PHPBB_INSTALL}
-
-# Update sqlite db file permissions
-sudo chown -R vagrant /tmp/phpbb.sqlite3
+php${PHP_VERSION} ${PHPBB_PATH}/phpBB/install/phpbbcli.php install ${PHPBB_INSTALL}
# Add DEBUG mode to phpBB to remove annoying installer warnings
-sed -i "$ a @define('DEBUG', true);" ${PHPBB_CONFIG}
+echo "@define('DEBUG', true);" >> ${PHPBB_CONFIG}
+
+# Change environment to development
+sed -i '/^.*PHPBB_ENVIRONMENT.*$/s/production/development/' ${PHPBB_CONFIG}
# Update the PHP memory limits (enough to allow phpunit tests to run)
-sed -i "s/memory_limit = .*/memory_limit = 1024M/" /etc/php5/fpm/php.ini
+sed -i "s/memory_limit = .*/memory_limit = 1024M/" /etc/php/${PHP_VERSION}/fpm/php.ini
+
+# Fix for urls with app.php
+sed -i "s/cgi.fix_pathinfo=.*/cgi.fix_pathinfo=1/" /etc/php/${PHP_VERSION}/fpm/php.ini
+
+# Restart php-fpm to apply php.ini changes
+systemctl restart php${PHP_VERSION}-fpm.service
echo "Your board is ready at http://192.168.10.10/"
diff --git a/vagrant/bootstrap.yaml b/vagrant/bootstrap.yaml
index 1c2b265712..0877c506aa 100644
--- a/vagrant/bootstrap.yaml
+++ b/vagrant/bootstrap.yaml
@@ -14,18 +14,16 @@ keys:
folders:
- map: "."
to: "/home/vagrant/phpbb"
+ php: "7.2"
sites:
- map: phpbb.app
to: "/home/vagrant/phpbb/phpBB"
+ type: apache
databases:
- phpbb
-variables:
- - key: APP_ENV
- value: local
-
# blackfire:
# - id: foo
# token: bar