Skip to content

Commit

Permalink
Merge branch 'release/0.50.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
mblaschke committed Jun 6, 2016
2 parents c2a403b + 2862834 commit 6e8c544
Show file tree
Hide file tree
Showing 923 changed files with 4,525 additions and 930 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARGS = $(filter-out $@,$(MAKECMDGOALS))
MAKEFLAGS += --silent
.PHONY: test documentation
.PHONY: test documentation baselayout provision

DOCKER_REPOSITORY=`cat DOCKER_REPOSITORY`
DOCKER_TAG_LATEST=`cat DOCKER_TAG_LATEST`
Expand Down Expand Up @@ -31,9 +31,12 @@ test:
test-hub-images:
DOCKER_PULL=1 make test

baselayout:
BASELAYOUT=1 PROVISION=0 bash bin/provision.sh

provision:
python bin/buildDockerfile.py --template=template/ --dockerfile=docker/
bash bin/provision.sh
BASELAYOUT=0 PROVISION=1 bash bin/provision.sh

publish: dist-update rebuild test push

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Command | Description
`DEBUG=1 make all` | Show log of build process even if process is successfull
`FORCE=1 make all` | Force container build (`docker build --no-cache ...`)
<br> |
`make baselayout` | Build and deploy baselayout.tar
`make provision` | Deploy all configuration files from [_provisioning/](_provisioning/README.md)
`make dist-update` | Update local distrubtion images (CentOS, Debian, Ubuntu)
<br> |
Expand Down
97 changes: 58 additions & 39 deletions bin/provision.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

if [ -n "$1" ]; then
if [[ -n "$1" ]]; then
BUILD_TARGET="$1"
else
BUILD_TARGET="all"
Expand All @@ -11,6 +11,17 @@ if [[ "$BUILD_MODE" == "push" ]]; then
exit 0
fi

if [[ "$BASELAYOUT" -eq 1 ]]; then
BASELAYOUT=1
else
BASELAYOUT=0
fi

if [[ "$PROVISION" -eq 1 ]]; then
PROVISION=1
else
PROVISION=0
fi

set -o pipefail # trace ERR through pipes
set -o errtrace # trace ERR through 'time command' and other functions
Expand Down Expand Up @@ -105,11 +116,13 @@ function listDirectoriesWithFilter() {
#
##
function buildBaselayout() {
echo " * Building localscripts"
if [[ "$BASELAYOUT" -eq 1 ]]; then
echo " * Building localscripts"

cd "${BASELAYOUT_DIR}"
rm -f baselayout.tar
$TAR -jc --owner=0 --group=0 -f baselayout.tar *
cd "${BASELAYOUT_DIR}"
rm -f baselayout.tar
$TAR -jc --owner=0 --group=0 -f baselayout.tar *
fi
}

###
Expand All @@ -119,15 +132,17 @@ function buildBaselayout() {
#
##
function deployBaselayout() {
DOCKER_CONTAINER="$1"
DOCKER_FILTER="$2"

listDirectoriesWithFilter "${DOCKER_DIR}/${DOCKER_CONTAINER}" "${DOCKER_FILTER}" | while read DOCKER_DIR; do
if [ -f "${DOCKER_DIR}/Dockerfile" ]; then
echo " - $(relativeDir $DOCKER_DIR)"
cp baselayout.tar "${DOCKER_DIR}/baselayout.tar"
fi
done
if [[ "$BASELAYOUT" -eq 1 ]]; then
DOCKER_CONTAINER="$1"
DOCKER_FILTER="$2"

listDirectoriesWithFilter "${DOCKER_DIR}/${DOCKER_CONTAINER}" "${DOCKER_FILTER}" | while read DOCKER_DIR; do
if [ -f "${DOCKER_DIR}/Dockerfile" ]; then
echo " - $(relativeDir $DOCKER_DIR)"
cp baselayout.tar "${DOCKER_DIR}/baselayout.tar"
fi
done
fi
}

#######################################
Expand All @@ -144,16 +159,18 @@ function deployBaselayout() {
#
##
function clearConfiguration() {
DOCKER_CONTAINER="$1"
DOCKER_FILTER="$2"

echo " -> Clearing configuration"
listDirectoriesWithFilter "${DOCKER_DIR}/${DOCKER_CONTAINER}" "${DOCKER_FILTER}" | while read DOCKER_DIR; do
if [ -f "${DOCKER_DIR}/Dockerfile" ]; then
echo " - $(relativeDir $DOCKER_DIR)"
rm -rf "${DOCKER_DIR}/conf/"
fi
done
if [[ "$PROVISION" -eq 1 ]]; then
DOCKER_CONTAINER="$1"
DOCKER_FILTER="$2"

echo " -> Clearing configuration"
listDirectoriesWithFilter "${DOCKER_DIR}/${DOCKER_CONTAINER}" "${DOCKER_FILTER}" | while read DOCKER_DIR; do
if [ -f "${DOCKER_DIR}/Dockerfile" ]; then
echo " - $(relativeDir $DOCKER_DIR)"
rm -rf "${DOCKER_DIR}/conf/"
fi
done
fi
}

###
Expand All @@ -167,22 +184,24 @@ function clearConfiguration() {
#
##
function deployConfiguration() {
PROVISION_SUB_DIR="$1"
DOCKER_CONTAINER="$2"
DOCKER_FILTER="$3"

if [ "$DOCKER_FILTER" == "*" ]; then
echo " -> Deploying configuration"
else
echo " -> Deploying configuration with filter '$DOCKER_FILTER'"
fi

listDirectoriesWithFilter "${DOCKER_DIR}/${DOCKER_CONTAINER}" "${DOCKER_FILTER}" | while read DOCKER_DIR; do
if [ -f "${DOCKER_DIR}/Dockerfile" ]; then
echo " - $(relativeDir $DOCKER_DIR)"
cp -f -r "${PROVISION_DIR}/${PROVISION_SUB_DIR}/." "${DOCKER_DIR}/conf/"
if [[ "$PROVISION" -eq 1 ]]; then
PROVISION_SUB_DIR="$1"
DOCKER_CONTAINER="$2"
DOCKER_FILTER="$3"

if [ "$DOCKER_FILTER" == "*" ]; then
echo " -> Deploying configuration"
else
echo " -> Deploying configuration with filter '$DOCKER_FILTER'"
fi
done

listDirectoriesWithFilter "${DOCKER_DIR}/${DOCKER_CONTAINER}" "${DOCKER_FILTER}" | while read DOCKER_DIR; do
if [ -f "${DOCKER_DIR}/Dockerfile" ]; then
echo " - $(relativeDir $DOCKER_DIR)"
cp -f -r "${PROVISION_DIR}/${PROVISION_SUB_DIR}/." "${DOCKER_DIR}/conf/"
fi
done
fi
}

###
Expand Down
2 changes: 1 addition & 1 deletion docker/ansible/alpine-3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:alpine-3
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=7
LABEL io.webdevops.version=0.50.2
LABEL io.webdevops.version=0.50.3
2 changes: 1 addition & 1 deletion docker/ansible/centos-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:centos-7
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=7
LABEL io.webdevops.version=0.50.2
LABEL io.webdevops.version=0.50.3
2 changes: 1 addition & 1 deletion docker/ansible/debian-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:debian-7
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=7
LABEL io.webdevops.version=0.50.2
LABEL io.webdevops.version=0.50.3
2 changes: 1 addition & 1 deletion docker/ansible/debian-8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:debian-8
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=7
LABEL io.webdevops.version=0.50.2
LABEL io.webdevops.version=0.50.3
2 changes: 1 addition & 1 deletion docker/ansible/debian-9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:debian-9
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=7
LABEL io.webdevops.version=0.50.2
LABEL io.webdevops.version=0.50.3
2 changes: 1 addition & 1 deletion docker/ansible/ubuntu-12.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:ubuntu-12.04
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=7
LABEL io.webdevops.version=0.50.2
LABEL io.webdevops.version=0.50.3
2 changes: 1 addition & 1 deletion docker/ansible/ubuntu-14.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:ubuntu-14.04
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=7
LABEL io.webdevops.version=0.50.2
LABEL io.webdevops.version=0.50.3
2 changes: 1 addition & 1 deletion docker/ansible/ubuntu-15.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:ubuntu-15.04
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=7
LABEL io.webdevops.version=0.50.2
LABEL io.webdevops.version=0.50.3
2 changes: 1 addition & 1 deletion docker/ansible/ubuntu-15.10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:ubuntu-15.10
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=7
LABEL io.webdevops.version=0.50.2
LABEL io.webdevops.version=0.50.3
2 changes: 1 addition & 1 deletion docker/ansible/ubuntu-16.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ FROM webdevops/bootstrap:ubuntu-16.04
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=7
LABEL io.webdevops.version=0.50.2
LABEL io.webdevops.version=0.50.3
2 changes: 1 addition & 1 deletion docker/apache/alpine-3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/base:alpine-3
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=7
LABEL io.webdevops.version=0.50.2
LABEL io.webdevops.version=0.50.3

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache/alpine-3/Dockerfile.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{ docker.version() }}

{{ docker.environmentWeb() }}
{{ environment.web() }}

{{ docker.copy('conf/', '/opt/docker/') }}

Expand Down
8 changes: 8 additions & 0 deletions docker/apache/alpine-3/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"

if [[ -n "${WEB_PHP_SOCKET+x}" ]]; then
## WEB_PHP_SOCKET is set
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<PHP_SOCKET>" "$WEB_PHP_SOCKET"
else
## WEB_PHP_SOCKET is not set, remove PHP files
rm /opt/docker/etc/httpd/conf.d/10-php.conf
fi
4 changes: 2 additions & 2 deletions docker/apache/alpine-3/conf/etc/httpd/conf.d/10-php.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Proxy fcgi://127.0.0.1:9000>
<Proxy fcgi://<PHP_SOCKET>>
ProxySet connectiontimeout=5 timeout=600
</Proxy>

<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:9000"
SetHandler "proxy:fcgi://<PHP_SOCKET>"
</FilesMatch>
2 changes: 1 addition & 1 deletion docker/apache/centos-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/base:centos-7
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=7
LABEL io.webdevops.version=0.50.2
LABEL io.webdevops.version=0.50.3

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache/centos-7/Dockerfile.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{ docker.version() }}

{{ docker.environmentWeb() }}
{{ environment.web() }}

{{ docker.copy('conf/', '/opt/docker/') }}

Expand Down
8 changes: 8 additions & 0 deletions docker/apache/centos-7/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"

if [[ -n "${WEB_PHP_SOCKET+x}" ]]; then
## WEB_PHP_SOCKET is set
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<PHP_SOCKET>" "$WEB_PHP_SOCKET"
else
## WEB_PHP_SOCKET is not set, remove PHP files
rm /opt/docker/etc/httpd/conf.d/10-php.conf
fi
4 changes: 2 additions & 2 deletions docker/apache/centos-7/conf/etc/httpd/conf.d/10-php.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Proxy fcgi://127.0.0.1:9000>
<Proxy fcgi://<PHP_SOCKET>>
ProxySet connectiontimeout=5 timeout=600
</Proxy>

<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:9000"
SetHandler "proxy:fcgi://<PHP_SOCKET>"
</FilesMatch>
2 changes: 1 addition & 1 deletion docker/apache/debian-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/base:debian-7
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=7
LABEL io.webdevops.version=0.50.2
LABEL io.webdevops.version=0.50.3

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache/debian-7/Dockerfile.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{ docker.version() }}

{{ docker.environmentWeb() }}
{{ environment.web() }}

{{ docker.copy('conf/', '/opt/docker/') }}

Expand Down
8 changes: 8 additions & 0 deletions docker/apache/debian-7/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"

if [[ -n "${WEB_PHP_SOCKET+x}" ]]; then
## WEB_PHP_SOCKET is set
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<PHP_SOCKET>" "$WEB_PHP_SOCKET"
else
## WEB_PHP_SOCKET is not set, remove PHP files
rm /opt/docker/etc/httpd/conf.d/10-php.conf
fi
2 changes: 1 addition & 1 deletion docker/apache/debian-7/conf/etc/httpd/conf.d/10-php.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization -idle-timeout 600
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host <PHP_SOCKET> -pass-header Authorization -idle-timeout 600

<Directory /usr/lib/cgi-bin>
<IfVersion < 2.4>
Expand Down
2 changes: 1 addition & 1 deletion docker/apache/debian-8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/base:debian-8
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=7
LABEL io.webdevops.version=0.50.2
LABEL io.webdevops.version=0.50.3

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache/debian-8/Dockerfile.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{ docker.version() }}

{{ docker.environmentWeb() }}
{{ environment.web() }}

{{ docker.copy('conf/', '/opt/docker/') }}

Expand Down
8 changes: 8 additions & 0 deletions docker/apache/debian-8/conf/bin/service.d/httpd.d/10-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@ find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<DOCUMENT_ROOT>" "$WEB_DOCUMENT_ROOT"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<ALIAS_DOMAIN>" "$WEB_ALIAS_DOMAIN"
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<SERVERNAME>" "$HOSTNAME"

if [[ -n "${WEB_PHP_SOCKET+x}" ]]; then
## WEB_PHP_SOCKET is set
find /opt/docker/etc/httpd/ -iname '*.conf' -print0 | xargs -0 -r rpl --quiet "<PHP_SOCKET>" "$WEB_PHP_SOCKET"
else
## WEB_PHP_SOCKET is not set, remove PHP files
rm /opt/docker/etc/httpd/conf.d/10-php.conf
fi
2 changes: 1 addition & 1 deletion docker/apache/debian-8/conf/etc/httpd/conf.d/10-php.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization -idle-timeout 600
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host <PHP_SOCKET> -pass-header Authorization -idle-timeout 600

<Directory /usr/lib/cgi-bin>
<IfVersion < 2.4>
Expand Down
2 changes: 1 addition & 1 deletion docker/apache/debian-9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/base:debian-9
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=7
LABEL io.webdevops.version=0.50.2
LABEL io.webdevops.version=0.50.3

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
Loading

0 comments on commit 6e8c544

Please sign in to comment.