From 6196e4ae4d5bec5d43dbf0db7c19a8ba4e43ae9e Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 12 Mar 2016 11:26:26 -0800 Subject: [ticket/14547] Add Vagrant to phpBB PHPBB3-14547 --- vagrant/after.sh | 30 +++++++++++++++++++++++ vagrant/bootstrap.yaml | 36 ++++++++++++++++++++++++++++ vagrant/phpbb-install-config.yml | 51 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+) create mode 100755 vagrant/after.sh create mode 100644 vagrant/bootstrap.yaml create mode 100644 vagrant/phpbb-install-config.yml (limited to 'vagrant') diff --git a/vagrant/after.sh b/vagrant/after.sh new file mode 100755 index 0000000000..440f1bc49e --- /dev/null +++ b/vagrant/after.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +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 + +# Backup current config.php file +if [ -e ${PHPBB_CONFIG} ] +then + cp --backup=numbered ${PHPBB_CONFIG} ${PHPBB_CONFIG}.bak +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 + +# Add DEBUG mode to phpBB to remove annoying installer warnings +sed -i "$ a @define('DEBUG', true);" ${PHPBB_CONFIG} + +echo "Your board is ready at http://192.168.10.10/" diff --git a/vagrant/bootstrap.yaml b/vagrant/bootstrap.yaml new file mode 100644 index 0000000000..06a6147b86 --- /dev/null +++ b/vagrant/bootstrap.yaml @@ -0,0 +1,36 @@ +--- +ip: "192.168.10.10" +memory: 2048 +cpus: 1 +hostname: phpbb +name: phpbb +provider: virtualbox + +authorize: ~/.ssh/id_rsa.pub + +keys: + - ~/.ssh/id_rsa + +folders: + - map: "." + to: "/home/vagrant/phpbb" + +sites: + - map: phpbb.app + to: "/home/vagrant/phpbb/phpBB" + +databases: + - phpbb + +# blackfire: +# - id: foo +# token: bar +# client-id: foo +# client-token: bar + +# ports: +# - send: 50000 +# to: 5000 +# - send: 7777 +# to: 777 +# protocol: udp diff --git a/vagrant/phpbb-install-config.yml b/vagrant/phpbb-install-config.yml new file mode 100644 index 0000000000..023d7b1a9d --- /dev/null +++ b/vagrant/phpbb-install-config.yml @@ -0,0 +1,51 @@ +installer: + admin: + name: admin + password: adminadmin + email: admin@example.org + + board: + lang: en + name: phpBB Dev Board + description: My phpBB development board + + database: + dbms: mysqli + dbhost: 127.0.0.1 + dbport: ~ + dbuser: homestead + dbpasswd: secret + dbname: phpbb + table_prefix: phpbb_ +# database: +# dbms: postgres +# dbhost: 127.0.0.1 +# dbport: 5432 +# dbuser: homestead +# dbpasswd: secret +# dbname: phpbb +# table_prefix: phpbb_ +# database: +# dbms: sqlite3 +# dbhost: /tmp/phpbb.sqlite3 +# dbport: ~ +# dbuser: ~ +# dbpasswd: ~ +# dbname: phpbb +# table_prefix: phpbb_ + + email: + enabled: false + smtp_delivery : ~ + smtp_host: ~ + smtp_auth: ~ + smtp_user: ~ + smtp_pass: ~ + + server: + cookie_secure: false + server_protocol: http:// + force_server_vars: false + server_name: 192.168.10.10 + server_port: 80 + script_path: / -- cgit v1.2.1 From 3cd0c53118b0e339c644d760bcb914998c455209 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sun, 20 Mar 2016 09:43:23 -0700 Subject: [ticket/14547] Use package compatible with phpBB requirements PHPBB3-14547 --- vagrant/after.sh | 3 +++ vagrant/bootstrap.yaml | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'vagrant') diff --git a/vagrant/after.sh b/vagrant/after.sh index 440f1bc49e..09a6fe25fa 100755 --- a/vagrant/after.sh +++ b/vagrant/after.sh @@ -27,4 +27,7 @@ sudo chown -R vagrant /tmp/phpbb.sqlite3 # Add DEBUG mode to phpBB to remove annoying installer warnings sed -i "$ a @define('DEBUG', true);" ${PHPBB_CONFIG} +# Update the PHP memory limits (enough to allow phpunit tests to run) +sed -i "s/memory_limit = .*/memory_limit = 768M/" /etc/php5/fpm/php.ini + echo "Your board is ready at http://192.168.10.10/" diff --git a/vagrant/bootstrap.yaml b/vagrant/bootstrap.yaml index 06a6147b86..1c2b265712 100644 --- a/vagrant/bootstrap.yaml +++ b/vagrant/bootstrap.yaml @@ -22,6 +22,10 @@ sites: databases: - phpbb +variables: + - key: APP_ENV + value: local + # blackfire: # - id: foo # token: bar -- cgit v1.2.1 From d5e342db3ae7b7edec6c5df6c248f3e06091b610 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sun, 19 Jun 2016 09:40:51 -0700 Subject: [ticket/14547] Fix Docs and increase PHP memory limit PHPBB3-14547 --- vagrant/after.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vagrant') diff --git a/vagrant/after.sh b/vagrant/after.sh index 09a6fe25fa..aadb7e7492 100755 --- a/vagrant/after.sh +++ b/vagrant/after.sh @@ -28,6 +28,6 @@ sudo chown -R vagrant /tmp/phpbb.sqlite3 sed -i "$ a @define('DEBUG', true);" ${PHPBB_CONFIG} # Update the PHP memory limits (enough to allow phpunit tests to run) -sed -i "s/memory_limit = .*/memory_limit = 768M/" /etc/php5/fpm/php.ini +sed -i "s/memory_limit = .*/memory_limit = 1024M/" /etc/php5/fpm/php.ini echo "Your board is ready at http://192.168.10.10/" -- cgit v1.2.1