Skip to content

Commit

Permalink
Merge branch 'release/1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mblaschke committed Jan 6, 2017
2 parents 4547ce0 + 5bcf0b3 commit 0ddd8fc
Show file tree
Hide file tree
Showing 309 changed files with 2,538 additions and 761 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
All notable changes to this project will be documented in this file.
This project adheres to [WebDevOps.io Dockerfile](https://github.com/webdevops/Dockerfile).

## [1.2.0] - 2016-12-20
- Add mod_proxy_fcgi and mod_fastcgi configuration for Apache (Debian 9 doesn't provide mod_fastcgi anymore; using ifmodule-directive for automatic configuration switching)
- Removed mod_fastcgi on most installations were it is not needed
- Added tests to ensure /dev/null and /dev/zero are writeable
- Removed postfix hostname (is sometimes injected via installation)
- Fixed smaller bugs
- Fixed bin/console docker:exec command execution
- Updated gems for serverspec

## [1.1.4] - 2016-12-20
- Add task dependencies for docker:push (push in the right order)
- Show blacklist/whitelist for bin/console commands (even if not in verbose mode)
Expand Down
5 changes: 3 additions & 2 deletions bin/command/docker_exec_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ def run_task(self, configuration):
'-t',
'--rm',
dockerfile['image']['fullname'],
'sh -c "%s"' % (' '.join(docker_command))
'bash',
'-c',
'%s' % (' '.join(docker_command))
]

status = Command.execute(cmd)

if status:
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=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0
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=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0
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=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0
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=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0
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=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0
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=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0
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=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0
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=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0
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=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0
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=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0
2 changes: 1 addition & 1 deletion docker/apache-dev/alpine-3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:alpine-3
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/centos-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:centos-7
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/debian-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:debian-7
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/debian-8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:debian-8
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/debian-9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:debian-9
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/ubuntu-12.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:ubuntu-12.04
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/ubuntu-14.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:ubuntu-14.04
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/ubuntu-15.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:ubuntu-15.04
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/ubuntu-15.10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:ubuntu-15.10
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
2 changes: 1 addition & 1 deletion docker/apache-dev/ubuntu-16.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FROM webdevops/apache:ubuntu-16.04
MAINTAINER [email protected]
LABEL vendor=WebDevOps.io
LABEL io.webdevops.layout=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
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=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
42 changes: 36 additions & 6 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,37 @@
<Proxy fcgi://<PHP_SOCKET>>
ProxySet connectiontimeout=5 timeout=600
</Proxy>
#############################
# mod_proxy_fcgi
# official solution
# apache 2.4 and later
#############################

<IfModule mod_proxy_fcgi.c>
<Proxy fcgi://<PHP_SOCKET>>
ProxySet connectiontimeout=5 timeout=600
</Proxy>

<FilesMatch \.php$>
SetHandler "proxy:fcgi://<PHP_SOCKET>"
</FilesMatch>
</IfModule>

#############################
# mod_fastcgi
# apaache 2.2 and 2.4
#############################

<IfModule fastcgi_module>
AddHandler php-fcgi .php
Action php-fcgi /php-fcgi
Alias /php-fcgi /usr/lib/cgi-bin/php-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php-fcgi -host "<PHP_SOCKET>" -pass-header Authorization -idle-timeout 600

<Directory /usr/lib/cgi-bin>
<IfVersion < 2.4>
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</Directory>
</IfModule>

<FilesMatch \.php$>
SetHandler "proxy:fcgi://<PHP_SOCKET>"
</FilesMatch>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- name: Set apache vhost file [RedHat family]
set_fact:
apache_main_path: /etc/httpd/
apache_docker_vhost: /etc/httpd/conf.d/docker.conf
apache_docker_vhost: /etc/httpd/conf.d/zzz-docker.conf
when: ansible_os_family == 'RedHat'

- name: Set apache vhost file [Debian family]
Expand All @@ -15,7 +15,7 @@
- name: Set apache vhost file [Alpine family]
set_fact:
apache_main_path: /etc/apache2/
apache_docker_vhost: /etc/apache2/conf.d/docker.conf
apache_docker_vhost: /etc/apache2/conf.d/zzz-docker.conf
when: ansible_os_family == 'Alpine'

- name: Enable apache main config
Expand Down Expand Up @@ -112,6 +112,10 @@
- { regexp: 'LoadModule socache_shmcb_module', line: 'LoadModule socache_shmcb_module /usr/lib/apache2/mod_socache_shmcb.so' }
when: ansible_os_family == 'Alpine'

- name: Remove default vhost from ssl configuration [Alpine family]
command: sed -i -e '1h;2,$H;$!d;g' -e 's/<VirtualHost.*<\/VirtualHost>/#-> removed vhost/g' /etc/apache2/conf.d/ssl.conf
when: ansible_os_family == 'Alpine'

- name: Disable proxy [Alpine family]
lineinfile:
dest: '/etc/apache2/conf.d/proxy.conf'
Expand Down Expand Up @@ -141,3 +145,12 @@
- { path: '/opt/docker/etc/httpd/ssl/server.crt', state: 'file', mode: '0640' }
- { path: '/opt/docker/etc/httpd/ssl/server.csr', state: 'file', mode: '0640' }
- { path: '/opt/docker/etc/httpd/ssl/server.key', state: 'file', mode: '0640' }

- name: Maintain lock directory [Debian family]
file:
path: "/var/lock/apache2"
state: "directory"
mode: "0750"
owner: "www-data"
group: "www-data"
when: ansible_os_family == 'Debian'
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=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0

ENV WEB_DOCUMENT_ROOT /app
ENV WEB_DOCUMENT_INDEX index.php
Expand Down
42 changes: 36 additions & 6 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,37 @@
<Proxy fcgi://<PHP_SOCKET>>
ProxySet connectiontimeout=5 timeout=600
</Proxy>
#############################
# mod_proxy_fcgi
# official solution
# apache 2.4 and later
#############################

<IfModule mod_proxy_fcgi.c>
<Proxy fcgi://<PHP_SOCKET>>
ProxySet connectiontimeout=5 timeout=600
</Proxy>

<FilesMatch \.php$>
SetHandler "proxy:fcgi://<PHP_SOCKET>"
</FilesMatch>
</IfModule>

#############################
# mod_fastcgi
# apaache 2.2 and 2.4
#############################

<IfModule fastcgi_module>
AddHandler php-fcgi .php
Action php-fcgi /php-fcgi
Alias /php-fcgi /usr/lib/cgi-bin/php-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php-fcgi -host "<PHP_SOCKET>" -pass-header Authorization -idle-timeout 600

<Directory /usr/lib/cgi-bin>
<IfVersion < 2.4>
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</Directory>
</IfModule>

<FilesMatch \.php$>
SetHandler "proxy:fcgi://<PHP_SOCKET>"
</FilesMatch>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- name: Set apache vhost file [RedHat family]
set_fact:
apache_main_path: /etc/httpd/
apache_docker_vhost: /etc/httpd/conf.d/docker.conf
apache_docker_vhost: /etc/httpd/conf.d/zzz-docker.conf
when: ansible_os_family == 'RedHat'

- name: Set apache vhost file [Debian family]
Expand All @@ -15,7 +15,7 @@
- name: Set apache vhost file [Alpine family]
set_fact:
apache_main_path: /etc/apache2/
apache_docker_vhost: /etc/apache2/conf.d/docker.conf
apache_docker_vhost: /etc/apache2/conf.d/zzz-docker.conf
when: ansible_os_family == 'Alpine'

- name: Enable apache main config
Expand Down Expand Up @@ -112,6 +112,10 @@
- { regexp: 'LoadModule socache_shmcb_module', line: 'LoadModule socache_shmcb_module /usr/lib/apache2/mod_socache_shmcb.so' }
when: ansible_os_family == 'Alpine'

- name: Remove default vhost from ssl configuration [Alpine family]
command: sed -i -e '1h;2,$H;$!d;g' -e 's/<VirtualHost.*<\/VirtualHost>/#-> removed vhost/g' /etc/apache2/conf.d/ssl.conf
when: ansible_os_family == 'Alpine'

- name: Disable proxy [Alpine family]
lineinfile:
dest: '/etc/apache2/conf.d/proxy.conf'
Expand Down Expand Up @@ -141,3 +145,12 @@
- { path: '/opt/docker/etc/httpd/ssl/server.crt', state: 'file', mode: '0640' }
- { path: '/opt/docker/etc/httpd/ssl/server.csr', state: 'file', mode: '0640' }
- { path: '/opt/docker/etc/httpd/ssl/server.key', state: 'file', mode: '0640' }

- name: Maintain lock directory [Debian family]
file:
path: "/var/lock/apache2"
state: "directory"
mode: "0750"
owner: "www-data"
group: "www-data"
when: ansible_os_family == 'Debian'
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=8
LABEL io.webdevops.version=1.1.4
LABEL io.webdevops.version=1.2.0

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 @@ -6,6 +6,6 @@

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

{{ apache.debian8() }}
{{ apache.debian7() }}

{{ docker.expose('80 443') }}
Loading

0 comments on commit 0ddd8fc

Please sign in to comment.