forked from TYPO3/typo3
-
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.
[TASK] travis: Acceptance tests with nginx+fpm
* Start a php-fpm server on port 9000 * Install nginx, configure and start on port 8000 for acceptance tests * Use phantomjs provided by composer directly without selenium Change-Id: Ie25c27d765437ed0a12d1df9b0c9b1a4355b1024 Resolves: #75837 Releases: master Reviewed-on: https://review.typo3.org/47815 Reviewed-by: Christian Kuhn <[email protected]> Tested-by: Christian Kuhn <[email protected]>
- Loading branch information
Showing
5 changed files
with
95 additions
and
26 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
15 changes: 15 additions & 0 deletions
15
typo3/sysext/core/Build/Configuration/TravisNginxFpm/ConfigureStartNginxFpm.sh
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,15 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
DIR=$(realpath $(dirname "$0")) | ||
PHP_VERSION=$(phpenv version-name) | ||
ROOT=$(realpath "$DIR/../../../../../..") | ||
PHP_FPM_BIN="$HOME/.phpenv/versions/$PHP_VERSION/sbin/php-fpm" | ||
PHP_FPM_CONF="$DIR/php-fpm.conf" | ||
|
||
# Start php-fpm | ||
"$PHP_FPM_BIN" --fpm-config "$PHP_FPM_CONF" | ||
|
||
# Build nginx config file and start nginx | ||
sed -e "s|{ROOT}|$ROOT|g" < "$DIR/nginx.tpl.conf" > "$ROOT/nginx.conf" | ||
nginx -c "$ROOT/nginx.conf" |
56 changes: 56 additions & 0 deletions
56
typo3/sysext/core/Build/Configuration/TravisNginxFpm/nginx.tpl.conf
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,56 @@ | ||
error_log /tmp/error.log; | ||
pid /tmp/nginx.pid; | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
# Set an array of temp and cache file options that will otherwise default to restricted locations accessible only to root | ||
client_body_temp_path /tmp/client_body; | ||
fastcgi_temp_path /tmp/fastcgi_temp; | ||
proxy_temp_path /tmp/proxy_temp; | ||
scgi_temp_path /tmp/scgi_temp; | ||
uwsgi_temp_path /tmp/uwsgi_temp; | ||
|
||
# Basic Settings | ||
sendfile on; | ||
tcp_nopush on; | ||
tcp_nodelay on; | ||
keepalive_timeout 65; | ||
types_hash_max_size 2048; | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
# Logging Settings | ||
access_log /tmp/access.log; | ||
|
||
# Gzip Settings | ||
gzip on; | ||
gzip_disable "msie6"; | ||
|
||
server { | ||
listen 8000 default_server; | ||
listen [::]:8000 default_server ipv6only=on; | ||
|
||
root {ROOT}; | ||
|
||
location / { | ||
# First attempt to serve request as file, then as directory, then fall back to index.html | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
location ~* "\.php(/|$)" { | ||
include /etc/nginx/fastcgi_params; | ||
|
||
fastcgi_split_path_info ^(.+\.php)(.*)$; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
fastcgi_param SERVER_NAME $host; | ||
|
||
fastcgi_pass 127.0.0.1:9000; | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
typo3/sysext/core/Build/Configuration/TravisNginxFpm/php-fpm.conf
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,7 @@ | ||
[travis] | ||
listen = 9000 | ||
listen.mode = 0666 | ||
pm = static | ||
pm.max_children = 5 | ||
request_terminate_timeout = 360s | ||
php_admin_value[memory_limit] = 256M |
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