forked from phpbb/phpbb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge PR phpbb#1201 branch 'develop-olympus' into develop
* develop-olympus: [ticket/11337] Abort setup-webserver.sh script when an error occurs. [ticket/11337] Only run functional tests on 5.3.19 or higher. No FPM otherwise. [ticket/11337] Silence nginx config file writing. [ticket/11337] php-fpm.conf is no longer owned by root. [ticket/11337] Run functional tests on travis using nginx and php-fpm. Conflicts: .travis.yml
- Loading branch information
Showing
4 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/bash | ||
# | ||
# @copyright (c) 2013 phpBB Group | ||
# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 | ||
# | ||
set -e | ||
|
||
sudo apt-get update -qq | ||
sudo apt-get install -qq nginx realpath | ||
|
||
sudo service nginx stop | ||
|
||
DIR=$(dirname "$0") | ||
PHPBB_ROOT_PATH=$(realpath "$DIR/../phpBB") | ||
|
||
NGINX_CONF="/etc/nginx/sites-enabled/default" | ||
|
||
PHP_FPM_BIN="$HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/sbin/php-fpm" | ||
PHP_FPM_CONF="$DIR/php-fpm.conf" | ||
PHP_FPM_SOCK=$(realpath "$DIR")/php-fpm.sock | ||
|
||
USER=$(whoami) | ||
|
||
# php-fpm configuration | ||
echo " | ||
[global] | ||
[travis] | ||
user = $USER | ||
group = $USER | ||
listen = $PHP_FPM_SOCK | ||
pm = static | ||
pm.max_children = 2 | ||
php_admin_value[memory_limit] = 128M | ||
" > $PHP_FPM_CONF | ||
|
||
# nginx configuration | ||
echo " | ||
server { | ||
listen 80; | ||
root $PHPBB_ROOT_PATH/; | ||
index index.php index.html; | ||
location ~ \.php$ { | ||
fastcgi_pass unix:$PHP_FPM_SOCK; | ||
include fastcgi_params; | ||
} | ||
} | ||
" | sudo tee $NGINX_CONF > /dev/null | ||
|
||
# Start daemons | ||
sudo $PHP_FPM_BIN --fpm-config "$DIR/php-fpm.conf" | ||
sudo service nginx start |