Commit a1b8cc7c authored by Christian Kuhn's avatar Christian Kuhn
Browse files

Merge branch 'release/1.0.0'

parents b118917b 2a934dcc
.DS_Store
.vagrant
*.swp
build_baseimage
build_php55
build_php56
build_php70
build_php71
build_bamboo-php55
build_bamboo-php56
build_bamboo-php70
build_bamboo-php71
.idea
\ No newline at end of file
NAME_BASEIMAGE = typo3gmbh/baseimage
MAJOR_BASEIMAGE=1
MINOR_BASEIMAGE=0
PATCHLEVEL_BASEIMAGE=3
FULLVERSION_BASEIMAGE=$(MAJOR_BASEIMAGE).$(MINOR_BASEIMAGE).$(PATCHLEVEL_BASEIMAGE)
SHORTVERSION_BASEIMAGE=$(MAJOR_BASEIMAGE).$(MINOR_BASEIMAGE)
NAME_PHP55 = typo3gmbh/php55
MAJOR_PHP55=1
MINOR_PHP55=0
PATCHLEVEL_PHP55=0
FULLVERSION_PHP55=$(MAJOR_PHP55).$(MINOR_PHP55).$(PATCHLEVEL_PHP55)
SHORTVERSION_PHP55=$(MAJOR_PHP55).$(MINOR_PHP55)
NAME_PHP56 = typo3gmbh/php56
MAJOR_PHP56=1
MINOR_PHP56=0
PATCHLEVEL_PHP56=0
FULLVERSION_PHP56=$(MAJOR_PHP56).$(MINOR_PHP56).$(PATCHLEVEL_PHP56)
SHORTVERSION_PHP56=$(MAJOR_PHP56).$(MINOR_PHP56)
NAME_PHP70 = typo3gmbh/php70
MAJOR_PHP70=1
MINOR_PHP70=0
PATCHLEVEL_PHP70=0
FULLVERSION_PHP70=$(MAJOR_PHP70).$(MINOR_PHP70).$(PATCHLEVEL_PHP70)
SHORTVERSION_PHP70=$(MAJOR_PHP70).$(MINOR_PHP70)
NAME_PHP71 = typo3gmbh/php71
MAJOR_PHP71=1
MINOR_PHP71=0
PATCHLEVEL_PHP71=0
FULLVERSION_PHP71=$(MAJOR_PHP71).$(MINOR_PHP71).$(PATCHLEVEL_PHP71)
SHORTVERSION_PHP71=$(MAJOR_PHP71).$(MINOR_PHP71)
NAME_BAMBOO_PHP55 = typo3gmbh/bamboo-remote-agent-php55
MAJOR_BAMBOO_PHP55=1
MINOR_BAMBOO_PHP55=0
PATCHLEVEL_BAMBOO_PHP55=3
FULLVERSION_BAMBOO_PHP55=$(MAJOR_BAMBOO_PHP55).$(MINOR_BAMBOO_PHP55).$(PATCHLEVEL_BAMBOO_PHP55)
SHORTVERSION_BAMBOO_PHP55=$(MAJOR_BAMBOO_PHP55).$(MINOR_BAMBOO_PHP55)
NAME_BAMBOO_PHP56 = typo3gmbh/bamboo-remote-agent-php56
MAJOR_BAMBOO_PHP56=1
MINOR_BAMBOO_PHP56=0
PATCHLEVEL_BAMBOO_PHP56=3
FULLVERSION_BAMBOO_PHP56=$(MAJOR_BAMBOO_PHP56).$(MINOR_BAMBOO_PHP56).$(PATCHLEVEL_BAMBOO_PHP56)
SHORTVERSION_BAMBOO_PHP56=$(MAJOR_BAMBOO_PHP56).$(MINOR_BAMBOO_PHP56)
NAME_BAMBOO_PHP70 = typo3gmbh/bamboo-remote-agent-php70
MAJOR_BAMBOO_PHP70=1
MINOR_BAMBOO_PHP70=0
PATCHLEVEL_BAMBOO_PHP70=15
FULLVERSION_BAMBOO_PHP70=$(MAJOR_BAMBOO_PHP70).$(MINOR_BAMBOO_PHP70).$(PATCHLEVEL_BAMBOO_PHP70)
SHORTVERSION_BAMBOO_PHP70=$(MAJOR_BAMBOO_PHP70).$(MINOR_BAMBOO_PHP70)
NAME_BAMBOO_PHP71 = typo3gmbh/bamboo-remote-agent-php71
MAJOR_BAMBOO_PHP71=1
MINOR_BAMBOO_PHP71=0
PATCHLEVEL_BAMBOO_PHP71=7
FULLVERSION_BAMBOO_PHP71=$(MAJOR_BAMBOO_PHP71).$(MINOR_BAMBOO_PHP71).$(PATCHLEVEL_BAMBOO_PHP71)
SHORTVERSION_BAMBOO_PHP71=$(MAJOR_BAMBOO_PHP71).$(MINOR_BAMBOO_PHP71)
.PHONY: \
all \
build \
build_baseimage \
build_php55 \
build_php56 \
build_php70 \
build_php71 \
build_bamboo_php55 \
build_bamboo_php56 \
build_bamboo_php70 \
build_bamboo_php71 \
release \
release_baseimage \
release_php55 \
release_php56 \
release_php70 \
release_php71 \
release_bamboo_php55 \
release_bamboo_php56 \
release_bamboo_php70 \
release_bamboo_php71 \
clean \
clean_baseimage \
clean_php55 \
clean_php56 \
clean_php70 \
clean_php71 \
clean_bamboo_php55 \
clean_bamboo_php56 \
clean_bamboo_php70 \
clean_bamboo_php71 \
clean_images \
clean_images_baseimage \
clean_images_php55 \
clean_images_php56 \
clean_images_php70 \
clean_images_php71 \
clean_images_bamboo_php55 \
clean_images_bamboo_php56 \
clean_images_bamboo_php70 \
clean_images_bamboo_php71
all: \
build
build: \
build_baseimage \
build_php55 \
build_php56 \
build_php70 \
build_php71 \
build_bamboo_php55 \
build_bamboo_php56 \
build_bamboo_php70 \
build_bamboo_php71
release: \
release_baseimage \
release_php55 \
release_php56 \
release_php70 \
release_php71 \
release_bamboo_php55 \
release_bamboo_php56 \
release_bamboo_php70 \
release_bamboo_php71
clean: \
clean_baseimage \
clean_php55 \
clean_php56 \
clean_php70 \
clean_php71 \
clean_bamboo_php55 \
clean_bamboo_php56 \
clean_bamboo_php70 \
clean_bamboo_php71
clean_images: \
clean_images_baseimage \
clean_images_php55 \
clean_images_php56 \
clean_images_php70 \
clean_images_php71 \
clean_images_bamboo_php55 \
clean_images_bamboo_php56 \
clean_images_bamboo_php70 \
clean_images_bamboo_php71
build_baseimage:
rm -rf build_baseimage
cp -pR baseimage build_baseimage
docker build -t $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) build_baseimage
docker tag $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) $(NAME_BASEIMAGE):$(SHORTVERSION_BASEIMAGE)
release_baseimage:
@if ! docker images $(NAME_BASEIMAGE) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_BASEIMAGE); then \
echo "$(NAME_BASEIMAGE) version $(FULLVERSION_BASEIMAGE) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) $(NAME_BASEIMAGE):latest
docker push $(NAME_BASEIMAGE):latest
docker push $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE)
docker push $(NAME_BASEIMAGE):$(SHORTVERSION_BASEIMAGE)
clean_baseimage:
rm -rf build_baseimage
clean_images_baseimage:
docker rmi $(NAME_BASEIMAGE):$(FULLVERSION_BASEIMAGE) || true
docker rmi $(NAME_BASEIMAGE):$(SHORTVERSION_BASEIMAGE) || true
docker rmi $(NAME_BASEIMAGE):latest || true
build_php55:
rm -rf build_php55
cp -pR php55 build_php55
docker build -t $(NAME_PHP55):$(FULLVERSION_PHP55) build_php55
docker tag $(NAME_PHP55):$(FULLVERSION_PHP55) $(NAME_PHP55):$(SHORTVERSION_PHP55)
release_php55:
@if ! docker images $(NAME_PHP55) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_PHP55); then \
echo "$(NAME_PHP55) version $(FULLVERSION_PHP55) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_PHP55):$(FULLVERSION_PHP55) $(NAME_PHP55):latest
docker push $(NAME_PHP55):latest
docker push $(NAME_PHP55):$(FULLVERSION_PHP55)
docker push $(NAME_PHP55):$(SHORTVERSION_PHP55)
clean_php55:
rm -rf build_php55
clean_images_php55:
docker rmi $(NAME_PHP55):latest || true
docker rmi $(NAME_PHP55):$(SHORTVERSION_PHP55) || true
docker rmi $(NAME_PHP55):$(FULLVERSION_PHP55) || true
build_php56:
rm -rf build_php56
cp -pR php56 build_php56
docker build -t $(NAME_PHP56):$(FULLVERSION_PHP56) build_php56
docker tag $(NAME_PHP56):$(FULLVERSION_PHP56) $(NAME_PHP56):$(SHORTVERSION_PHP56)
release_php56:
@if ! docker images $(NAME_PHP56) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_PHP56); then \
echo "$(NAME_PHP56) version $(FULLVERSION_PHP56) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_PHP56):$(FULLVERSION_PHP56) $(NAME_PHP56):latest
docker push $(NAME_PHP56):latest
docker push $(NAME_PHP56):$(FULLVERSION_PHP56)
docker push $(NAME_PHP56):$(SHORTVERSION_PHP56)
clean_php56:
rm -rf build_php56
clean_images_php56:
docker rmi $(NAME_PHP56):latest || true
docker rmi $(NAME_PHP56):$(SHORTVERSION_PHP56) || true
docker rmi $(NAME_PHP56):$(FULLVERSION_PHP56) || true
build_php70:
rm -rf build_php70
cp -pR php70 build_php70
docker build -t $(NAME_PHP70):$(FULLVERSION_PHP70) build_php70
docker tag $(NAME_PHP70):$(FULLVERSION_PHP70) $(NAME_PHP70):$(SHORTVERSION_PHP70)
release_php70:
@if ! docker images $(NAME_PHP70) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_PHP70); then \
echo "$(NAME_PHP70) version $(FULLVERSION_PHP70) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_PHP70):$(FULLVERSION_PHP70) $(NAME_PHP70):latest
docker push $(NAME_PHP70):latest
docker push $(NAME_PHP70):$(FULLVERSION_PHP70)
docker push $(NAME_PHP70):$(SHORTVERSION_PHP70)
clean_php70:
rm -rf build_php70
clean_images_php70:
docker rmi $(NAME_PHP70):latest || true
docker rmi $(NAME_PHP70):$(SHORTVERSION_PHP70) || true
docker rmi $(NAME_PHP70):$(FULLVERSION_PHP70) || true
build_php71:
rm -rf build_php71
cp -pR php71 build_php71
docker build -t $(NAME_PHP71):$(FULLVERSION_PHP71) build_php71
docker tag $(NAME_PHP71):$(FULLVERSION_PHP71) $(NAME_PHP71):$(SHORTVERSION_PHP71)
release_php71:
@if ! docker images $(NAME_PHP71) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_PHP71); then \
echo "$(NAME_PHP71) version $(FULLVERSION_PHP71) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_PHP71):$(FULLVERSION_PHP71) $(NAME_PHP71):latest
docker push $(NAME_PHP71):latest
docker push $(NAME_PHP71):$(FULLVERSION_PHP71)
docker push $(NAME_PHP71):$(SHORTVERSION_PHP71)
clean_php71:
rm -rf build_php71
clean_images_php71:
docker rmi $(NAME_PHP71):latest || true
docker rmi $(NAME_PHP71):$(SHORTVERSION_PHP71) || true
docker rmi $(NAME_PHP71):$(FULLVERSION_PHP71) || true
build_bamboo_php55:
rm -rf build_bamboo-php55
cp -pR bamboo-remote-agent-php55 build_bamboo-php55
echo system.imageVersion=$(FULLVERSION_BAMBOO_PHP55) >> build_bamboo-php55/config/bamboo/bamboo-capabilities.properties
docker build -t $(NAME_BAMBOO_PHP55):$(FULLVERSION_BAMBOO_PHP55) build_bamboo-php55
release_bamboo_php55:
@if ! docker images $(NAME_BAMBOO_PHP55) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_BAMBOO_PHP55); then \
echo "$(NAME_BAMBOO_PHP55) version $(FULLVERSION_BAMBOO_PHP55) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_BAMBOO_PHP55):$(FULLVERSION_BAMBOO_PHP55) $(NAME_BAMBOO_PHP55):$(SHORTVERSION_BAMBOO_PHP55)
docker tag $(NAME_BAMBOO_PHP55):$(FULLVERSION_BAMBOO_PHP55) $(NAME_BAMBOO_PHP55):latest
docker push $(NAME_BAMBOO_PHP55):latest
docker push $(NAME_BAMBOO_PHP55):$(FULLVERSION_BAMBOO_PHP55)
docker push $(NAME_BAMBOO_PHP55):$(SHORTVERSION_BAMBOO_PHP55)
clean_bamboo_php55:
rm -rf build_bamboo-php55
clean_images_bamboo_php55:
docker rmi $(NAME_BAMBOO_PHP55):latest || true
docker rmi $(NAME_BAMBOO_PHP55):$(SHORTVERSION_BAMBOO_PHP55) || true
docker rmi $(NAME_BAMBOO_PHP55):$(FULLVERSION_BAMBOO_PHP55) || true
build_bamboo_php56:
rm -rf build_bamboo-php56
cp -pR bamboo-remote-agent-php56 build_bamboo-php56
echo system.imageVersion=$(FULLVERSION_BAMBOO_PHP56) >> build_bamboo-php56/config/bamboo/bamboo-capabilities.properties
docker build -t $(NAME_BAMBOO_PHP56):$(FULLVERSION_BAMBOO_PHP56) build_bamboo-php56
release_bamboo_php56:
@if ! docker images $(NAME_BAMBOO_PHP56) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_BAMBOO_PHP56); then \
echo "$(NAME_BAMBOO_PHP56) version $(FULLVERSION_BAMBOO_PHP56) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_BAMBOO_PHP56):$(FULLVERSION_BAMBOO_PHP56) $(NAME_BAMBOO_PHP56):$(SHORTVERSION_BAMBOO_PHP56)
docker tag $(NAME_BAMBOO_PHP56):$(FULLVERSION_BAMBOO_PHP56) $(NAME_BAMBOO_PHP56):latest
docker push $(NAME_BAMBOO_PHP56):latest
docker push $(NAME_BAMBOO_PHP56):$(FULLVERSION_BAMBOO_PHP56)
docker push $(NAME_BAMBOO_PHP56):$(SHORTVERSION_BAMBOO_PHP56)
clean_bamboo_php56:
rm -rf build_bamboo-php56
clean_images_bamboo_php56:
docker rmi $(NAME_BAMBOO_PHP56):latest || true
docker rmi $(NAME_BAMBOO_PHP56):$(SHORTVERSION_BAMBOO_PHP56) || true
docker rmi $(NAME_BAMBOO_PHP56):$(FULLVERSION_BAMBOO_PHP56) || true
build_bamboo_php70:
rm -rf build_bamboo-php70
cp -pR bamboo-remote-agent-php70 build_bamboo-php70
echo system.imageVersion=$(FULLVERSION_BAMBOO_PHP70) >> build_bamboo-php70/config/bamboo/bamboo-capabilities.properties
docker build -t $(NAME_BAMBOO_PHP70):$(FULLVERSION_BAMBOO_PHP70) build_bamboo-php70
release_bamboo_php70:
@if ! docker images $(NAME_BAMBOO_PHP70) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_BAMBOO_PHP70); then \
echo "$(NAME_BAMBOO_PHP70) version $(FULLVERSION_BAMBOO_PHP70) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_BAMBOO_PHP70):$(FULLVERSION_BAMBOO_PHP70) $(NAME_BAMBOO_PHP70):$(SHORTVERSION_BAMBOO_PHP70)
docker tag $(NAME_BAMBOO_PHP70):$(FULLVERSION_BAMBOO_PHP70) $(NAME_BAMBOO_PHP70):latest
docker push $(NAME_BAMBOO_PHP70):latest
docker push $(NAME_BAMBOO_PHP70):$(FULLVERSION_BAMBOO_PHP70)
docker push $(NAME_BAMBOO_PHP70):$(SHORTVERSION_BAMBOO_PHP70)
clean_bamboo_php70:
rm -rf build_bamboo-php70
clean_images_bamboo_php70:
docker rmi $(NAME_BAMBOO_PHP70):latest || true
docker rmi $(NAME_BAMBOO_PHP70):$(SHORTVERSION_BAMBOO_PHP70) || true
docker rmi $(NAME_BAMBOO_PHP70):$(FULLVERSION_BAMBOO_PHP70) || true
build_bamboo_php71:
rm -rf build_bamboo-php71
cp -pR bamboo-remote-agent-php71 build_bamboo-php71
echo system.imageVersion=$(FULLVERSION_BAMBOO_PHP71) >> build_bamboo-php71/config/bamboo/bamboo-capabilities.properties
docker build -t $(NAME_BAMBOO_PHP71):$(FULLVERSION_BAMBOO_PHP71) build_bamboo-php71
release_bamboo_php71:
@if ! docker images $(NAME_BAMBOO_PHP71) | awk '{ print $$2 }' | grep -q -F $(FULLVERSION_BAMBOO_PHP71); then \
echo "$(NAME_BAMBOO_PHP71) version $(FULLVERSION_BAMBOO_PHP71) is not yet built. Please run 'make build'"; false; \
fi
docker tag $(NAME_BAMBOO_PHP71):$(FULLVERSION_BAMBOO_PHP71) $(NAME_BAMBOO_PHP71):$(SHORTVERSION_BAMBOO_PHP71)
docker tag $(NAME_BAMBOO_PHP71):$(FULLVERSION_BAMBOO_PHP71) $(NAME_BAMBOO_PHP71):latest
docker push $(NAME_BAMBOO_PHP71):latest
docker push $(NAME_BAMBOO_PHP71):$(FULLVERSION_BAMBOO_PHP71)
docker push $(NAME_BAMBOO_PHP71):$(SHORTVERSION_BAMBOO_PHP71)
clean_bamboo_php71:
rm -rf build_bamboo-php71
clean_images_bamboo_php71:
docker rmi $(NAME_BAMBOO_PHP71):latest || true
docker rmi $(NAME_BAMBOO_PHP71):$(SHORTVERSION_BAMBOO_PHP71) || true
docker rmi $(NAME_BAMBOO_PHP71):$(FULLVERSION_BAMBOO_PHP71) || true
# A set of Docker containers for TYPO3 testing infrastructure
## Introduction
This [repository](https://bitbucket.typo3.com/projects/T3COM/repos/bamboo-remote-agent/browse) contains
Docker container build scripts used within the [TYPO3 GmbH](https://typo3.com) infrastructure
to execute the TYPO3 CMS core tests and other build and packaging jobs.
The containers may be used by anyone to execute tests locally in order to have the exact
same environment as the "pre-merge tests" run for the TYPO3 CMS core.
The latest compiled versions of those containers can be pulled from [Docker Hub](https://hub.docker.com/r/typo3gmbh/).
Docker containers can be stacked: An image can use another image below to build its
own stuff on-top of that. This feature is used here.
## baseimage: A minimal Ubuntu base image modified for Docker-friendliness
This is the lowest layer of images put on top of each other.
typo3gmbh/baseimage is a Docker image based off of Phusion's baseimage-docker, but has been
modified to run on Ubuntu 16.04 and removes features deemed unnecessary for a modern baseimage.
baseimage is a special [Docker](https://www.docker.com) image that is configured for
correct use within Docker containers. It is Ubuntu, plus:
* Modifications for Docker-friendliness.
* Administration tools that are especially useful in the context of Docker.
* Mechanisms for easily running multiple processes, without violating the Docker philosophy.
baseimage is a fork from [passenger-docker](https://github.com/phusion/passenger-docker).
## bamboo-remote-agent-phpXY
typo3gmbh/bamboo-remote-agent-phpXY add PHP and other stuff on top of the baseimage. One container
per supported PHP version is built.
\ No newline at end of file
.DS_Store
.vagrant
php55_image
php56_image
php70_image
php71_image
.idea
\ No newline at end of file
FROM typo3gmbh/php55:1.0
MAINTAINER TYPO3 GmbH <info@typo3.com>
ADD . /pd_build
RUN /pd_build/install.sh
CMD ["/sbin/my_init"]
NAME = typo3gmbh/bamboo-remote-agent
MAJOR=1
MINOR=0
PATCHLEVEL=1
FULLVERSION=$(MAJOR).$(MINOR).$(PATCHLEVEL)
SHORTVERSION=$(MAJOR).$(MINOR)
.PHONY: \
all \
build \
release \
clean \
clean_images
all: build
build:
rm -rf php55_image
cp -pR image php55_image
echo system.imageVersion=$(FULLVERSION) >> php55_image/config/bamboo/bamboo-capabilities.properties
docker build -t $(NAME)-php55:$(FULLVERSION) --rm php55_image
release:
@if ! docker images $(NAME)-php55 | awk '{ print $$2 }' | grep -q -F $(FULLVERSION); then echo "$(NAME)-php55 version $(FULLVERSION) is not yet built. Please run 'make build'"; false; fi
docker tag $(NAME)-php55:$(FULLVERSION) $(NAME)-php55:$(SHORTVERSION)
docker tag $(NAME)-php55:$(FULLVERSION) $(NAME)-php55:latest
docker push $(NAME)-php55:latest
docker push $(NAME)-php55:$(FULLVERSION)
docker push $(NAME)-php55:$(SHORTVERSION)
clean:
rm -rf php55_image
clean_images:
docker rmi $(NAME)-php55:latest $(NAME)-php55:$(SHORTVERSION) $(NAME)-php55:$(FULLVERSION) || true
\ No newline at end of file
# Docker base images for TYPO3 Bamboo Agent
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
apt-get clean
rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
/usr/local/src/* \
/usr/include/php/20151012/ext/apcu/ \
#
rm -rf /pd_build
server {
listen 127.0.0.1:8000;
server_name localhost;
root /srv/bamboo-agent-home/xml-data/build-dir/CORE-CB-JOB1;
index index.php;
client_max_body_size 64M;
location /typo3/install {
return 307 $scheme://$host/typo3/sysext/install/Start/Install.php;
}
# Prevent clients from accessing hidden files (starting with a dot)
# This is particularly important if you store .htpasswd files in the site hierarchy
# Access to `/.well-known/` is allowed.
location ~* /\.(?!well-known\/) {
deny all;
}
# Prevent clients from accessing to backup/config/source files
location ~* (?:\.(?:bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$ {
deny all;
}
# Built-in filename-based cache busting
location ~* (.+)\.(?:\d+)\.(js|css|png|jpg|jpeg|gif)$ {
try_files $uri $1.$2;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# Check that the PHP script exists before passing it
try_files $fastcgi_script_name =404;
# Bypass the fact that try_files resets $fastcgi_path_info
# see: http://trac.nginx.org/nginx/ticket/321
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
fastcgi_index index.php;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param HTTPS $https if_not_empty;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
fastcgi_pass acceptance-tests-fpm;
fastcgi_read_timeout 90;
}
}
user www-data;
worker_processes 1;
pid /run/nginx.pid;
daemon off;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##