diff --git a/BLACKLIST b/BLACKLIST index 24fbcd68f..2e960e87b 100644 --- a/BLACKLIST +++ b/BLACKLIST @@ -1,3 +1,2 @@ ubuntu-16.04 -debian-9 -alpine-3-php7 \ No newline at end of file +debian-9 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 95aed7843..d2bab9f2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. This project adheres to [WebDevOps.io Dockerfile](https://github.com/webdevops/Dockerfile). +## [0.23.0] - 2016-04-03 +### Changed +- Enabled alpine-3-php7 images +- Fixed some smaller issues +- Added TYPO3 packages to sphinx image +- Fixed build system for new docker version (1.11.0) + ## [0.22.0] - 2016-04-03 ### Changed - Introduced base-app for application images diff --git a/FIXME.md b/FIXME.md index 206fe834a..e91dd96fd 100644 --- a/FIXME.md +++ b/FIXME.md @@ -23,3 +23,6 @@ Mostly upstream issues (eg. missing or broken packages) ## Alpine 3 (PHP5) - Missing mhash + +## Alpine 3 (PHP7) +- Missing gd diff --git a/README.md b/README.md index 5538017e4..82944e432 100644 --- a/README.md +++ b/README.md @@ -4,22 +4,24 @@ Dockerfiles for various prebuilt docker containers [![Docker layout](https://static.webdevops.io/docker-layout.small.png)](https://static.webdevops.io/docker-layout.png) -Dockerfile | Description | Depends on | ---------------------------------------------------------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------- | -[`bootstrap`](docker/base/README.md) | Distribution with ansible and some scripts | official docker files | -[`base`](docker/base/README.md) | Base containers for WebDevOps service containers | [`webdevops/bootstrap`](https://hub.docker.com/r/webdevops/bootstrap/) | -[`php`](docker/php/README.md) | PHP (cli and fpm) service containers | [`webdevops/base`](https://hub.docker.com/r/webdevops/base/) | -[`php-apache`](docker/php-apache/README.md) | PHP (cli and fpm) with Apache service containers | [`webdevops/php`](https://hub.docker.com/r/webdevops/php/) | -[`php-nginx`](docker/php-nginx/README.md) | PHP (cli and fpm) with Nginx service containers | [`webdevops/php`](https://hub.docker.com/r/webdevops/php/) | -[`hhvm`](docker/hhvm/README.md) | HHVM (cli and fcgi) service containers | [`webdevops/base`](https://hub.docker.com/r/webdevops/base/) | -[`hhvm-apache`](docker/hhvm-apache/README.md) | HHVM (cli and fcgi) with Apache service containers | [`webdevops/hhvm`](https://hub.docker.com/r/webdevops/hhvm/) | -[`hhvm-nginx`](docker/hhvm-nginx/README.md) | HHVM (cli and fcgi) with Nginx service containers | [`webdevops/hhvm`](https://hub.docker.com/r/webdevops/hhvm/) | -[`vsftp`](docker/vsftp/README.md) | VSFTP (ftp service) service container | [`webdevops/base:latest`](https://hub.docker.com/r/webdevops/base/) | -[`storage`](docker/storage/README.md) | Storage (noop) container | [`webdevops/base:latest`](https://hub.docker.com/r/webdevops/base/) | -[`ssh`](docker/ssh/README.md) | SSH service container | [`webdevops/base:latest`](https://hub.docker.com/r/webdevops/base/) | -[`postfix`](docker/postfix/README.md) | Postfix service container | [`webdevops/base:latest`](https://hub.docker.com/r/webdevops/base/) | -[`mail-sandbox`](docker/mail-sandbox/README.md) | Mail catcher service container (catches all mails via SMTP and are accessable via IMAP) | [`webdevops/postfix:latest`](https://hub.docker.com/r/webdevops/postfix/) | -[`samson-deployment`](docker/samson-deployment/README.md) | [Samson](https://github.com/webdevops/samson-deployment) based deployment service | [`zendesk/samson`](https://hub.docker.com/r/zendesk/samson/) | +Dockerfile | Description | Depends on | +--------------------------------------------------------- | --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +[`bootstrap`](docker/base/README.md) | Distribution with ansible and some scripts | official docker files | +[`base`](docker/base/README.md) | Base containers for WebDevOps service containers | [`webdevops/bootstrap`](https://hub.docker.com/r/webdevops/bootstrap/) | +[`base-app`](docker/base-app/README.md) | Base containers for WebDevOps application containers | [`webdevops/base`](https://hub.docker.com/r/webdevops/base/) | +[`php`](docker/php/README.md) | PHP (cli and fpm) service containers | [`webdevops/base-app`](https://hub.docker.com/r/webdevops/base-app/) | +[`php-apache`](docker/php-apache/README.md) | PHP (cli and fpm) with Apache service containers | [`webdevops/php`](https://hub.docker.com/r/webdevops/php/) | +[`php-nginx`](docker/php-nginx/README.md) | PHP (cli and fpm) with Nginx service containers | [`webdevops/php`](https://hub.docker.com/r/webdevops/php/) | +[`hhvm`](docker/hhvm/README.md) | HHVM (cli and fcgi) service containers | [`webdevops/base-app`](https://hub.docker.com/r/webdevops/base-app/) | +[`hhvm-apache`](docker/hhvm-apache/README.md) | HHVM (cli and fcgi) with Apache service containers | [`webdevops/hhvm`](https://hub.docker.com/r/webdevops/hhvm/) | +[`hhvm-nginx`](docker/hhvm-nginx/README.md) | HHVM (cli and fcgi) with Nginx service containers | [`webdevops/hhvm`](https://hub.docker.com/r/webdevops/hhvm/) | +[`vsftp`](docker/vsftp/README.md) | VSFTP (ftp service) service container | [`webdevops/base:latest`](https://hub.docker.com/r/webdevops/base/) | +[`storage`](docker/storage/README.md) | Storage (noop) container | [`webdevops/base:latest`](https://hub.docker.com/r/webdevops/base/) | +[`ssh`](docker/ssh/README.md) | SSH service container | [`webdevops/base:latest`](https://hub.docker.com/r/webdevops/base/) | +[`postfix`](docker/postfix/README.md) | Postfix service container | [`webdevops/base:latest`](https://hub.docker.com/r/webdevops/base/) | +[`mail-sandbox`](docker/mail-sandbox/README.md) | Mail catcher service container (catches all mails via SMTP and are accessable via IMAP) | [`webdevops/postfix:latest`](https://hub.docker.com/r/webdevops/postfix/) | +[`samson-deployment`](docker/samson-deployment/README.md) | [Samson](https://github.com/webdevops/samson-deployment) based deployment service | [`zendesk/samson`](https://hub.docker.com/r/zendesk/samson/) | +[`sphinx`](docker/sphinx/README.md) | Sphinx container | [`webdevops/bootstrap:alpine-3`](https://hub.docker.com/r/webdevops/bootstrap/) | # Building @@ -58,96 +60,3 @@ The configuration and provisioning files are build from [_provisioning/](_provis configuraiton for all containers. This also should reduce copy&paste errors because the configuration will be deployed automatically into containers on build process. -# Images - -Image | Info ------------------------------------ | ---------------------------------------------------------------------------------- -Bootstrap container | -webdevops/bootstrap:latest | [![](https://badge.imagelayers.io/webdevops/bootstrap:latest.svg)](https://imagelayers.io/?images=webdevops/bootstrap:latest 'Get your own badge on imagelayers.io') -webdevops/bootstrap:ubuntu-12.04 | [![](https://badge.imagelayers.io/webdevops/bootstrap:ubuntu-12.04.svg)](https://imagelayers.io/?images=webdevops/bootstrap:ubuntu-12.04 'Get your own badge on imagelayers.io') -webdevops/bootstrap:ubuntu-14.04 | [![](https://badge.imagelayers.io/webdevops/bootstrap:ubuntu-14.04.svg)](https://imagelayers.io/?images=webdevops/bootstrap:ubuntu-14.04 'Get your own badge on imagelayers.io') -webdevops/bootstrap:ubuntu-15.04 | [![](https://badge.imagelayers.io/webdevops/bootstrap:ubuntu-15.04.svg)](https://imagelayers.io/?images=webdevops/bootstrap:ubuntu-15.04 'Get your own badge on imagelayers.io') -webdevops/bootstrap:ubuntu-15.10 | [![](https://badge.imagelayers.io/webdevops/bootstrap:ubuntu-15.10.svg)](https://imagelayers.io/?images=webdevops/bootstrap:ubuntu-15.14 'Get your own badge on imagelayers.io') -webdevops/bootstrap:centos-7 | [![](https://badge.imagelayers.io/webdevops/bootstrap:centos-7.svg)](https://imagelayers.io/?images=webdevops/bootstrap:centos-7 'Get your own badge on imagelayers.io') -webdevops/bootstrap:debian-8 | [![](https://badge.imagelayers.io/webdevops/bootstrap:debian-8.svg)](https://imagelayers.io/?images=webdevops/bootstrap:debian-8 'Get your own badge on imagelayers.io') -
| -Base container | -webdevops/base:latest | [![](https://badge.imagelayers.io/webdevops/base:latest.svg)](https://imagelayers.io/?images=webdevops/base:latest 'Get your own badge on imagelayers.io') -webdevops/base:ubuntu-12.04 | [![](https://badge.imagelayers.io/webdevops/base:ubuntu-12.04.svg)](https://imagelayers.io/?images=webdevops/base:ubuntu-12.04 'Get your own badge on imagelayers.io') -webdevops/base:ubuntu-14.04 | [![](https://badge.imagelayers.io/webdevops/base:ubuntu-14.04.svg)](https://imagelayers.io/?images=webdevops/base:ubuntu-14.04 'Get your own badge on imagelayers.io') -webdevops/base:ubuntu-15.04 | [![](https://badge.imagelayers.io/webdevops/base:ubuntu-15.04.svg)](https://imagelayers.io/?images=webdevops/base:ubuntu-15.04 'Get your own badge on imagelayers.io') -webdevops/base:ubuntu-15.10 | [![](https://badge.imagelayers.io/webdevops/base:ubuntu-15.10.svg)](https://imagelayers.io/?images=webdevops/base:ubuntu-15.14 'Get your own badge on imagelayers.io') -webdevops/base:centos-7 | [![](https://badge.imagelayers.io/webdevops/base:centos-7.svg)](https://imagelayers.io/?images=webdevops/base:centos-7 'Get your own badge on imagelayers.io') -webdevops/base:debian-8 | [![](https://badge.imagelayers.io/webdevops/base:debian-8.svg)](https://imagelayers.io/?images=webdevops/base:debian-8 'Get your own badge on imagelayers.io') -
| -PHP container | -webdevops/php:latest | [![](https://badge.imagelayers.io/webdevops/php:latest.svg)](https://imagelayers.io/?images=webdevops/php:latest 'Get your own badge on imagelayers.io') -webdevops/php:ubuntu-12.04 | [![](https://badge.imagelayers.io/webdevops/php:ubuntu-12.04.svg)](https://imagelayers.io/?images=webdevops/php:ubuntu-12.04 'Get your own badge on imagelayers.io') -webdevops/php:ubuntu-14.04 | [![](https://badge.imagelayers.io/webdevops/php:ubuntu-14.04.svg)](https://imagelayers.io/?images=webdevops/php:ubuntu-14.04 'Get your own badge on imagelayers.io') -webdevops/php:ubuntu-15.04 | [![](https://badge.imagelayers.io/webdevops/php:ubuntu-15.04.svg)](https://imagelayers.io/?images=webdevops/php:ubuntu-15.04 'Get your own badge on imagelayers.io') -webdevops/php:ubuntu-15.10 | [![](https://badge.imagelayers.io/webdevops/php:ubuntu-15.10.svg)](https://imagelayers.io/?images=webdevops/php:ubuntu-15.14 'Get your own badge on imagelayers.io') -webdevops/php:centos-7 | [![](https://badge.imagelayers.io/webdevops/php:centos-7.svg)](https://imagelayers.io/?images=webdevops/php:centos-7 'Get your own badge on imagelayers.io') -webdevops/php:debian-8-php7 | [![](https://badge.imagelayers.io/webdevops/php:debian-8-php7.svg)](https://imagelayers.io/?images=webdevops/php:debian-8-php7 'Get your own badge on imagelayers.io') -webdevops/php:debian-8 | [![](https://badge.imagelayers.io/webdevops/php:debian-8.svg)](https://imagelayers.io/?images=webdevops/php:debian-8 'Get your own badge on imagelayers.io') -webdevops/php:debian-7 | [![](https://badge.imagelayers.io/webdevops/php:debian-7.svg)](https://imagelayers.io/?images=webdevops/php:debian-7 'Get your own badge on imagelayers.io') -
| -Apache HTTPD with PHP container| -webdevops/php-apache:latest | [![](https://badge.imagelayers.io/webdevops/php-apache:latest.svg)](https://imagelayers.io/?images=webdevops/php-apache:latest 'Get your own badge on imagelayers.io') -webdevops/php-apache:ubuntu-14.04 | [![](https://badge.imagelayers.io/webdevops/php-apache:ubuntu-14.04.svg)](https://imagelayers.io/?images=webdevops/php-apache:ubuntu-14.04 'Get your own badge on imagelayers.io') -webdevops/php-apache:ubuntu-15.04 | [![](https://badge.imagelayers.io/webdevops/php-apache:ubuntu-15.04.svg)](https://imagelayers.io/?images=webdevops/php-apache:ubuntu-15.04 'Get your own badge on imagelayers.io') -webdevops/php-apache:ubuntu-15.10 | [![](https://badge.imagelayers.io/webdevops/php-apache:ubuntu-15.10.svg)](https://imagelayers.io/?images=webdevops/php-apache:ubuntu-15.14 'Get your own badge on imagelayers.io') -webdevops/php-apache:centos-7 | [![](https://badge.imagelayers.io/webdevops/php-apache:centos-7.svg)](https://imagelayers.io/?images=webdevops/php-apache:centos-7 'Get your own badge on imagelayers.io') -webdevops/php-apache:debian-8-php7 | [![](https://badge.imagelayers.io/webdevops/php-apache:debian-8-php7.svg)](https://imagelayers.io/?images=webdevops/php-apache:debian-8-php7 'Get your own badge on imagelayers.io') -webdevops/php-apache:debian-8 | [![](https://badge.imagelayers.io/webdevops/php-apache:debian-8.svg)](https://imagelayers.io/?images=webdevops/php-apache:debian-8 'Get your own badge on imagelayers.io') -webdevops/php-apache:debian-7 | [![](https://badge.imagelayers.io/webdevops/php-apache:debian-7.svg)](https://imagelayers.io/?images=webdevops/php-apache:debian-7 'Get your own badge on imagelayers.io') -
| -NGINX with PHP container| -webdevops/php-nginx:latest | [![](https://badge.imagelayers.io/webdevops/php-nginx:latest.svg)](https://imagelayers.io/?images=webdevops/php-nginx:latest 'Get your own badge on imagelayers.io') -webdevops/php-nginx:ubuntu-12.04 | [![](https://badge.imagelayers.io/webdevops/php-nginx:ubuntu-12.04.svg)](https://imagelayers.io/?images=webdevops/php-nginx:ubuntu-12.04 'Get your own badge on imagelayers.io') -webdevops/php-nginx:ubuntu-14.04 | [![](https://badge.imagelayers.io/webdevops/php-nginx:ubuntu-14.04.svg)](https://imagelayers.io/?images=webdevops/php-nginx:ubuntu-14.04 'Get your own badge on imagelayers.io') -webdevops/php-nginx:ubuntu-15.04 | [![](https://badge.imagelayers.io/webdevops/php-nginx:ubuntu-15.04.svg)](https://imagelayers.io/?images=webdevops/php-nginx:ubuntu-15.04 'Get your own badge on imagelayers.io') -webdevops/php-nginx:ubuntu-15.10 | [![](https://badge.imagelayers.io/webdevops/php-nginx:ubuntu-15.10.svg)](https://imagelayers.io/?images=webdevops/php-nginx:ubuntu-15.14 'Get your own badge on imagelayers.io') -webdevops/php-nginx:centos-7 | [![](https://badge.imagelayers.io/webdevops/php-nginx:centos-7.svg)](https://imagelayers.io/?images=webdevops/php-nginx:centos-7 'Get your own badge on imagelayers.io') -webdevops/php-nginx:debian-8-php7 | [![](https://badge.imagelayers.io/webdevops/php-nginx:debian-8-php7.svg)](https://imagelayers.io/?images=webdevops/php-nginx:debian-8-php7 'Get your own badge on imagelayers.io') -webdevops/php-nginx:debian-8 | [![](https://badge.imagelayers.io/webdevops/php-nginx:debian-8.svg)](https://imagelayers.io/?images=webdevops/php-nginx:debian-8 'Get your own badge on imagelayers.io') -webdevops/php-nginx:debian-7 | [![](https://badge.imagelayers.io/webdevops/php-nginx:debian-7.svg)](https://imagelayers.io/?images=webdevops/php-nginx:debian-7 'Get your own badge on imagelayers.io') -
| -Apache HTTPD container| -webdevops/apache:latest | [![](https://badge.imagelayers.io/webdevops/apache:latest.svg)](https://imagelayers.io/?images=webdevops/apache:latest 'Get your own badge on imagelayers.io') -webdevops/apache:ubuntu-12.04 | [![](https://badge.imagelayers.io/webdevops/apache:ubuntu-12.04.svg)](https://imagelayers.io/?images=webdevops/apache:ubuntu-12.04 'Get your own badge on imagelayers.io') -webdevops/apache:ubuntu-14.04 | [![](https://badge.imagelayers.io/webdevops/apache:ubuntu-14.04.svg)](https://imagelayers.io/?images=webdevops/apache:ubuntu-14.04 'Get your own badge on imagelayers.io') -webdevops/apache:ubuntu-15.04 | [![](https://badge.imagelayers.io/webdevops/apache:ubuntu-15.04.svg)](https://imagelayers.io/?images=webdevops/apache:ubuntu-15.04 'Get your own badge on imagelayers.io') -webdevops/apache:ubuntu-15.10 | [![](https://badge.imagelayers.io/webdevops/apache:ubuntu-15.10.svg)](https://imagelayers.io/?images=webdevops/apache:ubuntu-15.14 'Get your own badge on imagelayers.io') -webdevops/apache:centos-7 | [![](https://badge.imagelayers.io/webdevops/apache:centos-7.svg)](https://imagelayers.io/?images=webdevops/apache:centos-7 'Get your own badge on imagelayers.io') -webdevops/apache:debian-8 | [![](https://badge.imagelayers.io/webdevops/apache:debian-8.svg)](https://imagelayers.io/?images=webdevops/apache:debian-8 'Get your own badge on imagelayers.io') -webdevops/apache:debian-7 | [![](https://badge.imagelayers.io/webdevops/apache:debian-7.svg)](https://imagelayers.io/?images=webdevops/apache:debian-7 'Get your own badge on imagelayers.io') -
| -Nginx container | -webdevops/nginx:latest | [![](https://badge.imagelayers.io/webdevops/nginx:latest.svg)](https://imagelayers.io/?images=webdevops/nginx:latest 'Get your own badge on imagelayers.io') -webdevops/nginx:ubuntu-12.04 | [![](https://badge.imagelayers.io/webdevops/nginx:ubuntu-12.04.svg)](https://imagelayers.io/?images=webdevops/nginx:ubuntu-12.04 'Get your own badge on imagelayers.io') -webdevops/nginx:ubuntu-14.04 | [![](https://badge.imagelayers.io/webdevops/nginx:ubuntu-14.04.svg)](https://imagelayers.io/?images=webdevops/nginx:ubuntu-14.04 'Get your own badge on imagelayers.io') -webdevops/nginx:ubuntu-15.04 | [![](https://badge.imagelayers.io/webdevops/nginx:ubuntu-15.04.svg)](https://imagelayers.io/?images=webdevops/nginx:ubuntu-15.04 'Get your own badge on imagelayers.io') -webdevops/nginx:ubuntu-15.10 | [![](https://badge.imagelayers.io/webdevops/nginx:ubuntu-15.10.svg)](https://imagelayers.io/?images=webdevops/nginx:ubuntu-15.14 'Get your own badge on imagelayers.io') -webdevops/nginx:centos-7 | [![](https://badge.imagelayers.io/webdevops/nginx:centos-7.svg)](https://imagelayers.io/?images=webdevops/nginx:centos-7 'Get your own badge on imagelayers.io') -webdevops/nginx:debian-8 | [![](https://badge.imagelayers.io/webdevops/nginx:debian-8.svg)](https://imagelayers.io/?images=webdevops/nginx:debian-8 'Get your own badge on imagelayers.io') -webdevops/nginx:debian-7 | [![](https://badge.imagelayers.io/webdevops/nginx:debian-7.svg)](https://imagelayers.io/?images=webdevops/nginx:debian-7 'Get your own badge on imagelayers.io') -
| -HHVM container | -webdevops/hhvm:latest | [![](https://badge.imagelayers.io/webdevops/hhvm:latest.svg)](https://imagelayers.io/?images=webdevops/hhvm:latest 'Get your own badge on imagelayers.io') -webdevops/hhvm:ubuntu-14.04 | [![](https://badge.imagelayers.io/webdevops/hhvm:ubuntu-14.04.svg)](https://imagelayers.io/?images=webdevops/hhvm:ubuntu-14.04 'Get your own badge on imagelayers.io') -
| -Apache HTTPD with HHVM container| -webdevops/hhvm-apache:latest | [![](https://badge.imagelayers.io/webdevops/hhvm-apache:latest.svg)](https://imagelayers.io/?images=webdevops/hhvm-apache:latest 'Get your own badge on imagelayers.io') -webdevops/hhvm-apache:ubuntu-14.04 | [![](https://badge.imagelayers.io/webdevops/hhvm-apache:ubuntu-14.04.svg)](https://imagelayers.io/?images=webdevops/hhvm-apache:ubuntu-14.04 'Get your own badge on imagelayers.io') -
| -NGINX with PHP container| -webdevops/hhvm-nginx:latest | [![](https://badge.imagelayers.io/webdevops/hhvm-nginx:latest.svg)](https://imagelayers.io/?images=webdevops/hhvm-nginx:latest 'Get your own badge on imagelayers.io') -webdevops/hhvm-nginx:ubuntu-14.04 | [![](https://badge.imagelayers.io/webdevops/hhvm-nginx:ubuntu-14.04.svg)](https://imagelayers.io/?images=webdevops/hhvm-nginx:ubuntu-14.04 'Get your own badge on imagelayers.io') -
| -Service container | -webdevops/samson-deployment:latest | [![](https://badge.imagelayers.io/webdevops/samson-deployment:latest.svg)](https://imagelayers.io/?images=webdevops/samson-deployment:latest 'Get your own badge on imagelayers.io') -webdevops/ssh:latest | [![](https://badge.imagelayers.io/webdevops/ssh:latest.svg)](https://imagelayers.io/?images=webdevops/ssh:latest 'Get your own badge on imagelayers.io') -webdevops/vsftp:latest | [![](https://badge.imagelayers.io/webdevops/vsftp:latest.svg)](https://imagelayers.io/?images=webdevops/vsftp:latest 'Get your own badge on imagelayers.io') -
| -Misc container | -webdevops/storage:latest | [![](https://badge.imagelayers.io/webdevops/storage:latest.svg)](https://imagelayers.io/?images=webdevops/storage:latest 'Get your own badge on imagelayers.io') diff --git a/bin/provision.sh b/bin/provision.sh index 7d446cbdb..b7bdb9e13 100755 --- a/bin/provision.sh +++ b/bin/provision.sh @@ -276,7 +276,6 @@ function header() { deployConfiguration php/alpine php 'alpine-*' # deploy php7 configuration to *-php7 containers - clearConfiguration php 'debian-*-php7' deployConfiguration php/php7 php '*-php7' } diff --git a/docker/ansible/alpine-3/Dockerfile b/docker/ansible/alpine-3/Dockerfile index 8c275a5d1..5f747c375 100644 --- a/docker/ansible/alpine-3/Dockerfile +++ b/docker/ansible/alpine-3/Dockerfile @@ -6,4 +6,4 @@ FROM webdevops/bootstrap:alpine-3 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.22.0 +LABEL io.webdevops.version=0.23.0 diff --git a/docker/ansible/centos-7/Dockerfile b/docker/ansible/centos-7/Dockerfile index a45e5c861..00343dce1 100644 --- a/docker/ansible/centos-7/Dockerfile +++ b/docker/ansible/centos-7/Dockerfile @@ -6,4 +6,4 @@ FROM webdevops/bootstrap:centos-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 diff --git a/docker/ansible/debian-7/Dockerfile b/docker/ansible/debian-7/Dockerfile index d9aedf2f4..561770bf6 100644 --- a/docker/ansible/debian-7/Dockerfile +++ b/docker/ansible/debian-7/Dockerfile @@ -6,4 +6,4 @@ FROM webdevops/bootstrap:debian-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 diff --git a/docker/ansible/debian-8/Dockerfile b/docker/ansible/debian-8/Dockerfile index 2dee18314..9fec6e9d1 100644 --- a/docker/ansible/debian-8/Dockerfile +++ b/docker/ansible/debian-8/Dockerfile @@ -6,4 +6,4 @@ FROM webdevops/bootstrap:debian-8 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 diff --git a/docker/ansible/debian-9/Dockerfile b/docker/ansible/debian-9/Dockerfile index d393eedae..6d1cf99bb 100644 --- a/docker/ansible/debian-9/Dockerfile +++ b/docker/ansible/debian-9/Dockerfile @@ -6,4 +6,4 @@ FROM webdevops/bootstrap:debian-9 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 diff --git a/docker/ansible/ubuntu-12.04/Dockerfile b/docker/ansible/ubuntu-12.04/Dockerfile index 38f1d9b89..2e0dc260a 100644 --- a/docker/ansible/ubuntu-12.04/Dockerfile +++ b/docker/ansible/ubuntu-12.04/Dockerfile @@ -6,4 +6,4 @@ FROM webdevops/bootstrap:ubuntu-12.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 diff --git a/docker/ansible/ubuntu-14.04/Dockerfile b/docker/ansible/ubuntu-14.04/Dockerfile index d07fda24c..8e1caa944 100644 --- a/docker/ansible/ubuntu-14.04/Dockerfile +++ b/docker/ansible/ubuntu-14.04/Dockerfile @@ -6,4 +6,4 @@ FROM webdevops/bootstrap:ubuntu-14.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 diff --git a/docker/ansible/ubuntu-15.04/Dockerfile b/docker/ansible/ubuntu-15.04/Dockerfile index 894871344..c71c46a1e 100644 --- a/docker/ansible/ubuntu-15.04/Dockerfile +++ b/docker/ansible/ubuntu-15.04/Dockerfile @@ -6,4 +6,4 @@ FROM webdevops/bootstrap:ubuntu-15.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 diff --git a/docker/ansible/ubuntu-15.10/Dockerfile b/docker/ansible/ubuntu-15.10/Dockerfile index ac42924d5..42f989377 100644 --- a/docker/ansible/ubuntu-15.10/Dockerfile +++ b/docker/ansible/ubuntu-15.10/Dockerfile @@ -6,4 +6,4 @@ FROM webdevops/bootstrap:ubuntu-15.10 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 diff --git a/docker/ansible/ubuntu-16.04/Dockerfile b/docker/ansible/ubuntu-16.04/Dockerfile index ae799f479..efc236298 100644 --- a/docker/ansible/ubuntu-16.04/Dockerfile +++ b/docker/ansible/ubuntu-16.04/Dockerfile @@ -6,4 +6,4 @@ FROM webdevops/bootstrap:ubuntu-16.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 diff --git a/docker/apache/alpine-3/Dockerfile b/docker/apache/alpine-3/Dockerfile index 55d5d516b..c3b4df4c5 100644 --- a/docker/apache/alpine-3/Dockerfile +++ b/docker/apache/alpine-3/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:alpine-3 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/apache/centos-7/Dockerfile b/docker/apache/centos-7/Dockerfile index 8e4b862da..162d0f9c0 100644 --- a/docker/apache/centos-7/Dockerfile +++ b/docker/apache/centos-7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:centos-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/apache/debian-7/Dockerfile b/docker/apache/debian-7/Dockerfile index 9a3018dda..ccb75b3d0 100644 --- a/docker/apache/debian-7/Dockerfile +++ b/docker/apache/debian-7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:debian-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/apache/debian-8/Dockerfile b/docker/apache/debian-8/Dockerfile index 30c51b0c3..47fd60f72 100644 --- a/docker/apache/debian-8/Dockerfile +++ b/docker/apache/debian-8/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:debian-8 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/apache/debian-9/Dockerfile b/docker/apache/debian-9/Dockerfile index 277539d7b..fdcf78489 100644 --- a/docker/apache/debian-9/Dockerfile +++ b/docker/apache/debian-9/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:debian-9 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/apache/ubuntu-12.04/Dockerfile b/docker/apache/ubuntu-12.04/Dockerfile index af3407b18..d5c87c38e 100644 --- a/docker/apache/ubuntu-12.04/Dockerfile +++ b/docker/apache/ubuntu-12.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:ubuntu-12.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/apache/ubuntu-14.04/Dockerfile b/docker/apache/ubuntu-14.04/Dockerfile index 6c5aa56e7..3ffbe0dfd 100644 --- a/docker/apache/ubuntu-14.04/Dockerfile +++ b/docker/apache/ubuntu-14.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:ubuntu-14.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/apache/ubuntu-15.04/Dockerfile b/docker/apache/ubuntu-15.04/Dockerfile index ffd3fa288..310635c82 100644 --- a/docker/apache/ubuntu-15.04/Dockerfile +++ b/docker/apache/ubuntu-15.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:ubuntu-15.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/apache/ubuntu-15.10/Dockerfile b/docker/apache/ubuntu-15.10/Dockerfile index 8767a061a..71556926c 100644 --- a/docker/apache/ubuntu-15.10/Dockerfile +++ b/docker/apache/ubuntu-15.10/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:ubuntu-15.10 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/apache/ubuntu-16.04/Dockerfile b/docker/apache/ubuntu-16.04/Dockerfile index 689d3b2da..9e0874348 100644 --- a/docker/apache/ubuntu-16.04/Dockerfile +++ b/docker/apache/ubuntu-16.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:ubuntu-16.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/base-app/alpine-3/Dockerfile b/docker/base-app/alpine-3/Dockerfile index 4056b2cc1..f068b8432 100644 --- a/docker/base-app/alpine-3/Dockerfile +++ b/docker/base-app/alpine-3/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:alpine-3 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.22.0 +LABEL io.webdevops.version=0.23.0 ENV APPLICATION_USER application ENV APPLICATION_GROUP application diff --git a/docker/base-app/alpine-3/conf/bin/service.d/dnsmasq.sh b/docker/base-app/alpine-3/conf/bin/service.d/dnsmasq.sh index 9b554b411..055b46289 100644 --- a/docker/base-app/alpine-3/conf/bin/service.d/dnsmasq.sh +++ b/docker/base-app/alpine-3/conf/bin/service.d/dnsmasq.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash ## clear dns file echo > /etc/dnsmasq.d/development diff --git a/docker/base-app/centos-7/Dockerfile b/docker/base-app/centos-7/Dockerfile index 24ad4e520..fedd39964 100644 --- a/docker/base-app/centos-7/Dockerfile +++ b/docker/base-app/centos-7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:centos-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV APPLICATION_USER application ENV APPLICATION_GROUP application diff --git a/docker/base-app/centos-7/conf/bin/service.d/dnsmasq.sh b/docker/base-app/centos-7/conf/bin/service.d/dnsmasq.sh index 9b554b411..055b46289 100644 --- a/docker/base-app/centos-7/conf/bin/service.d/dnsmasq.sh +++ b/docker/base-app/centos-7/conf/bin/service.d/dnsmasq.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash ## clear dns file echo > /etc/dnsmasq.d/development diff --git a/docker/base-app/debian-7/Dockerfile b/docker/base-app/debian-7/Dockerfile index 87e3e48dc..998f6ba1a 100644 --- a/docker/base-app/debian-7/Dockerfile +++ b/docker/base-app/debian-7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:debian-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV APPLICATION_USER application ENV APPLICATION_GROUP application diff --git a/docker/base-app/debian-7/conf/bin/service.d/dnsmasq.sh b/docker/base-app/debian-7/conf/bin/service.d/dnsmasq.sh index 9b554b411..055b46289 100644 --- a/docker/base-app/debian-7/conf/bin/service.d/dnsmasq.sh +++ b/docker/base-app/debian-7/conf/bin/service.d/dnsmasq.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash ## clear dns file echo > /etc/dnsmasq.d/development diff --git a/docker/base-app/debian-8/Dockerfile b/docker/base-app/debian-8/Dockerfile index 0aae1b2dc..60982a033 100644 --- a/docker/base-app/debian-8/Dockerfile +++ b/docker/base-app/debian-8/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:debian-8 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV APPLICATION_USER application ENV APPLICATION_GROUP application diff --git a/docker/base-app/debian-8/conf/bin/service.d/dnsmasq.sh b/docker/base-app/debian-8/conf/bin/service.d/dnsmasq.sh index 9b554b411..055b46289 100644 --- a/docker/base-app/debian-8/conf/bin/service.d/dnsmasq.sh +++ b/docker/base-app/debian-8/conf/bin/service.d/dnsmasq.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash ## clear dns file echo > /etc/dnsmasq.d/development diff --git a/docker/base-app/debian-9/Dockerfile b/docker/base-app/debian-9/Dockerfile index 157cd7099..9878fd36e 100644 --- a/docker/base-app/debian-9/Dockerfile +++ b/docker/base-app/debian-9/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:debian-9 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV APPLICATION_USER application ENV APPLICATION_GROUP application diff --git a/docker/base-app/debian-9/conf/bin/service.d/dnsmasq.sh b/docker/base-app/debian-9/conf/bin/service.d/dnsmasq.sh index 9b554b411..055b46289 100644 --- a/docker/base-app/debian-9/conf/bin/service.d/dnsmasq.sh +++ b/docker/base-app/debian-9/conf/bin/service.d/dnsmasq.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash ## clear dns file echo > /etc/dnsmasq.d/development diff --git a/docker/base-app/ubuntu-12.04/Dockerfile b/docker/base-app/ubuntu-12.04/Dockerfile index bf21e65a1..e9c8d007f 100644 --- a/docker/base-app/ubuntu-12.04/Dockerfile +++ b/docker/base-app/ubuntu-12.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:ubuntu-12.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV APPLICATION_USER application ENV APPLICATION_GROUP application diff --git a/docker/base-app/ubuntu-12.04/conf/bin/service.d/dnsmasq.sh b/docker/base-app/ubuntu-12.04/conf/bin/service.d/dnsmasq.sh index 9b554b411..055b46289 100644 --- a/docker/base-app/ubuntu-12.04/conf/bin/service.d/dnsmasq.sh +++ b/docker/base-app/ubuntu-12.04/conf/bin/service.d/dnsmasq.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash ## clear dns file echo > /etc/dnsmasq.d/development diff --git a/docker/base-app/ubuntu-14.04/Dockerfile b/docker/base-app/ubuntu-14.04/Dockerfile index 11529b264..e54ec0496 100644 --- a/docker/base-app/ubuntu-14.04/Dockerfile +++ b/docker/base-app/ubuntu-14.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:ubuntu-14.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV APPLICATION_USER application ENV APPLICATION_GROUP application diff --git a/docker/base-app/ubuntu-14.04/conf/bin/service.d/dnsmasq.sh b/docker/base-app/ubuntu-14.04/conf/bin/service.d/dnsmasq.sh index 9b554b411..055b46289 100644 --- a/docker/base-app/ubuntu-14.04/conf/bin/service.d/dnsmasq.sh +++ b/docker/base-app/ubuntu-14.04/conf/bin/service.d/dnsmasq.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash ## clear dns file echo > /etc/dnsmasq.d/development diff --git a/docker/base-app/ubuntu-15.04/Dockerfile b/docker/base-app/ubuntu-15.04/Dockerfile index a9461a05a..1db3e7d73 100644 --- a/docker/base-app/ubuntu-15.04/Dockerfile +++ b/docker/base-app/ubuntu-15.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:ubuntu-15.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV APPLICATION_USER application ENV APPLICATION_GROUP application diff --git a/docker/base-app/ubuntu-15.04/conf/bin/service.d/dnsmasq.sh b/docker/base-app/ubuntu-15.04/conf/bin/service.d/dnsmasq.sh index 9b554b411..055b46289 100644 --- a/docker/base-app/ubuntu-15.04/conf/bin/service.d/dnsmasq.sh +++ b/docker/base-app/ubuntu-15.04/conf/bin/service.d/dnsmasq.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash ## clear dns file echo > /etc/dnsmasq.d/development diff --git a/docker/base-app/ubuntu-15.10/Dockerfile b/docker/base-app/ubuntu-15.10/Dockerfile index f8f0221f1..7b5f375b8 100644 --- a/docker/base-app/ubuntu-15.10/Dockerfile +++ b/docker/base-app/ubuntu-15.10/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:ubuntu-15.10 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV APPLICATION_USER application ENV APPLICATION_GROUP application diff --git a/docker/base-app/ubuntu-15.10/conf/bin/service.d/dnsmasq.sh b/docker/base-app/ubuntu-15.10/conf/bin/service.d/dnsmasq.sh index 9b554b411..055b46289 100644 --- a/docker/base-app/ubuntu-15.10/conf/bin/service.d/dnsmasq.sh +++ b/docker/base-app/ubuntu-15.10/conf/bin/service.d/dnsmasq.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash ## clear dns file echo > /etc/dnsmasq.d/development diff --git a/docker/base-app/ubuntu-16.04/Dockerfile b/docker/base-app/ubuntu-16.04/Dockerfile index 27dc07c39..9f23816a1 100644 --- a/docker/base-app/ubuntu-16.04/Dockerfile +++ b/docker/base-app/ubuntu-16.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:ubuntu-16.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV APPLICATION_USER application ENV APPLICATION_GROUP application diff --git a/docker/base-app/ubuntu-16.04/conf/bin/service.d/dnsmasq.sh b/docker/base-app/ubuntu-16.04/conf/bin/service.d/dnsmasq.sh index 9b554b411..055b46289 100644 --- a/docker/base-app/ubuntu-16.04/conf/bin/service.d/dnsmasq.sh +++ b/docker/base-app/ubuntu-16.04/conf/bin/service.d/dnsmasq.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash ## clear dns file echo > /etc/dnsmasq.d/development diff --git a/docker/base/alpine-3/Dockerfile b/docker/base/alpine-3/Dockerfile index 09233a8b6..519e3947d 100644 --- a/docker/base/alpine-3/Dockerfile +++ b/docker/base/alpine-3/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/bootstrap:alpine-3 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.22.0 +LABEL io.webdevops.version=0.23.0 ENV DOCKER_CONF_HOME /opt/docker/ diff --git a/docker/base/centos-7/Dockerfile b/docker/base/centos-7/Dockerfile index 397451ced..f3103ae7e 100644 --- a/docker/base/centos-7/Dockerfile +++ b/docker/base/centos-7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/bootstrap:centos-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV DOCKER_CONF_HOME /opt/docker/ diff --git a/docker/base/debian-7/Dockerfile b/docker/base/debian-7/Dockerfile index 4053dffe5..e14dec4e9 100644 --- a/docker/base/debian-7/Dockerfile +++ b/docker/base/debian-7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/bootstrap:debian-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV DOCKER_CONF_HOME /opt/docker/ diff --git a/docker/base/debian-8/Dockerfile b/docker/base/debian-8/Dockerfile index 4a07e6512..4ecd3f878 100644 --- a/docker/base/debian-8/Dockerfile +++ b/docker/base/debian-8/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/bootstrap:debian-8 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV DOCKER_CONF_HOME /opt/docker/ diff --git a/docker/base/debian-9/Dockerfile b/docker/base/debian-9/Dockerfile index 5352fdc9c..9ac07a282 100644 --- a/docker/base/debian-9/Dockerfile +++ b/docker/base/debian-9/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/bootstrap:debian-9 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV DOCKER_CONF_HOME /opt/docker/ diff --git a/docker/base/ubuntu-12.04/Dockerfile b/docker/base/ubuntu-12.04/Dockerfile index 8531baf41..351e9bd55 100644 --- a/docker/base/ubuntu-12.04/Dockerfile +++ b/docker/base/ubuntu-12.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/bootstrap:ubuntu-12.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV DOCKER_CONF_HOME /opt/docker/ diff --git a/docker/base/ubuntu-14.04/Dockerfile b/docker/base/ubuntu-14.04/Dockerfile index 51389d06c..bdd0be8c0 100644 --- a/docker/base/ubuntu-14.04/Dockerfile +++ b/docker/base/ubuntu-14.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/bootstrap:ubuntu-14.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV DOCKER_CONF_HOME /opt/docker/ diff --git a/docker/base/ubuntu-15.04/Dockerfile b/docker/base/ubuntu-15.04/Dockerfile index 8677f9c2c..b760fca29 100644 --- a/docker/base/ubuntu-15.04/Dockerfile +++ b/docker/base/ubuntu-15.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/bootstrap:ubuntu-15.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV DOCKER_CONF_HOME /opt/docker/ diff --git a/docker/base/ubuntu-15.10/Dockerfile b/docker/base/ubuntu-15.10/Dockerfile index 518436b86..fc13187b8 100644 --- a/docker/base/ubuntu-15.10/Dockerfile +++ b/docker/base/ubuntu-15.10/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/bootstrap:ubuntu-15.10 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV DOCKER_CONF_HOME /opt/docker/ diff --git a/docker/base/ubuntu-16.04/Dockerfile b/docker/base/ubuntu-16.04/Dockerfile index 2be7458d3..f45523f77 100644 --- a/docker/base/ubuntu-16.04/Dockerfile +++ b/docker/base/ubuntu-16.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/bootstrap:ubuntu-16.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV DOCKER_CONF_HOME /opt/docker/ diff --git a/docker/bootstrap/alpine-3/Dockerfile b/docker/bootstrap/alpine-3/Dockerfile index 1cb141e47..e57f3646d 100644 --- a/docker/bootstrap/alpine-3/Dockerfile +++ b/docker/bootstrap/alpine-3/Dockerfile @@ -6,7 +6,7 @@ FROM alpine:3.3 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.22.0 +LABEL io.webdevops.version=0.23.0 # Ensure UTF-8 ENV LANG en_US.UTF-8 diff --git a/docker/bootstrap/centos-7/Dockerfile b/docker/bootstrap/centos-7/Dockerfile index e53e414db..fc27dfc3d 100644 --- a/docker/bootstrap/centos-7/Dockerfile +++ b/docker/bootstrap/centos-7/Dockerfile @@ -6,7 +6,7 @@ FROM centos:7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Add common scripts (from _localscripts) ADD scripts.tar / diff --git a/docker/bootstrap/debian-7/Dockerfile b/docker/bootstrap/debian-7/Dockerfile index 39a8cf246..9b3962033 100644 --- a/docker/bootstrap/debian-7/Dockerfile +++ b/docker/bootstrap/debian-7/Dockerfile @@ -6,7 +6,7 @@ FROM debian:7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Ensure UTF-8 ENV LANG en_US.UTF-8 diff --git a/docker/bootstrap/debian-8/Dockerfile b/docker/bootstrap/debian-8/Dockerfile index 7f6ec3f13..f80e88b13 100644 --- a/docker/bootstrap/debian-8/Dockerfile +++ b/docker/bootstrap/debian-8/Dockerfile @@ -6,7 +6,7 @@ FROM debian:8 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Ensure UTF-8 ENV LANG en_US.UTF-8 diff --git a/docker/bootstrap/debian-9/Dockerfile b/docker/bootstrap/debian-9/Dockerfile index b9d957b0f..c4d8b31a1 100644 --- a/docker/bootstrap/debian-9/Dockerfile +++ b/docker/bootstrap/debian-9/Dockerfile @@ -6,7 +6,7 @@ FROM debian:stretch MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Ensure UTF-8 ENV LANG en_US.UTF-8 diff --git a/docker/bootstrap/ubuntu-12.04/Dockerfile b/docker/bootstrap/ubuntu-12.04/Dockerfile index fbe36cbb8..f7aeac56c 100644 --- a/docker/bootstrap/ubuntu-12.04/Dockerfile +++ b/docker/bootstrap/ubuntu-12.04/Dockerfile @@ -6,7 +6,7 @@ FROM ubuntu:12.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Ensure UTF-8 RUN locale-gen en_US.UTF-8 diff --git a/docker/bootstrap/ubuntu-14.04/Dockerfile b/docker/bootstrap/ubuntu-14.04/Dockerfile index 6b676b8b0..360ac33d9 100644 --- a/docker/bootstrap/ubuntu-14.04/Dockerfile +++ b/docker/bootstrap/ubuntu-14.04/Dockerfile @@ -6,7 +6,7 @@ FROM ubuntu:14.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Ensure UTF-8 RUN locale-gen en_US.UTF-8 diff --git a/docker/bootstrap/ubuntu-15.04/Dockerfile b/docker/bootstrap/ubuntu-15.04/Dockerfile index 1f005f4f5..8a1b80944 100644 --- a/docker/bootstrap/ubuntu-15.04/Dockerfile +++ b/docker/bootstrap/ubuntu-15.04/Dockerfile @@ -6,7 +6,7 @@ FROM ubuntu:15.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Ensure UTF-8 RUN locale-gen en_US.UTF-8 diff --git a/docker/bootstrap/ubuntu-15.10/Dockerfile b/docker/bootstrap/ubuntu-15.10/Dockerfile index fc7404e03..4066ece5b 100644 --- a/docker/bootstrap/ubuntu-15.10/Dockerfile +++ b/docker/bootstrap/ubuntu-15.10/Dockerfile @@ -6,7 +6,7 @@ FROM ubuntu:15.10 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Ensure UTF-8 RUN locale-gen en_US.UTF-8 diff --git a/docker/bootstrap/ubuntu-16.04/Dockerfile b/docker/bootstrap/ubuntu-16.04/Dockerfile index eb6bad5e1..59493d7f9 100644 --- a/docker/bootstrap/ubuntu-16.04/Dockerfile +++ b/docker/bootstrap/ubuntu-16.04/Dockerfile @@ -6,7 +6,7 @@ FROM ubuntu:16.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Ensure UTF-8 RUN locale-gen en_US.UTF-8 diff --git a/docker/hhvm-apache/ubuntu-14.04/Dockerfile b/docker/hhvm-apache/ubuntu-14.04/Dockerfile index c16108e46..452c18635 100644 --- a/docker/hhvm-apache/ubuntu-14.04/Dockerfile +++ b/docker/hhvm-apache/ubuntu-14.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/hhvm:ubuntu-14.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/hhvm-nginx/ubuntu-14.04/Dockerfile b/docker/hhvm-nginx/ubuntu-14.04/Dockerfile index a7a9c0a6e..edb9959eb 100644 --- a/docker/hhvm-nginx/ubuntu-14.04/Dockerfile +++ b/docker/hhvm-nginx/ubuntu-14.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/hhvm:ubuntu-14.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/hhvm/ubuntu-14.04/Dockerfile b/docker/hhvm/ubuntu-14.04/Dockerfile index 351512f6c..8a4e1d21c 100644 --- a/docker/hhvm/ubuntu-14.04/Dockerfile +++ b/docker/hhvm/ubuntu-14.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:ubuntu-14.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app diff --git a/docker/mail-sandbox/ubuntu-14.04/Dockerfile b/docker/mail-sandbox/ubuntu-14.04/Dockerfile index 84150274a..bc2f0dc02 100644 --- a/docker/mail-sandbox/ubuntu-14.04/Dockerfile +++ b/docker/mail-sandbox/ubuntu-14.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/postfix:latest MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV MAILBOX_USERNAME "sandbox" ENV MAILBOX_PASSWORD "mail" diff --git a/docker/nginx/alpine-3/Dockerfile b/docker/nginx/alpine-3/Dockerfile index 30111144b..a293173b2 100644 --- a/docker/nginx/alpine-3/Dockerfile +++ b/docker/nginx/alpine-3/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:alpine-3 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/nginx/centos-7/Dockerfile b/docker/nginx/centos-7/Dockerfile index 7f551dabb..73ae3197a 100644 --- a/docker/nginx/centos-7/Dockerfile +++ b/docker/nginx/centos-7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:centos-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/nginx/debian-7/Dockerfile b/docker/nginx/debian-7/Dockerfile index 56daca656..2a1040db6 100644 --- a/docker/nginx/debian-7/Dockerfile +++ b/docker/nginx/debian-7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:debian-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/nginx/debian-8/Dockerfile b/docker/nginx/debian-8/Dockerfile index 3989a4eb9..9c33d4a8c 100644 --- a/docker/nginx/debian-8/Dockerfile +++ b/docker/nginx/debian-8/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:debian-8 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/nginx/debian-9/Dockerfile b/docker/nginx/debian-9/Dockerfile index aacc84363..9a267e6de 100644 --- a/docker/nginx/debian-9/Dockerfile +++ b/docker/nginx/debian-9/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:debian-9 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/nginx/ubuntu-12.04/Dockerfile b/docker/nginx/ubuntu-12.04/Dockerfile index 7cdd5c765..6f8e9e268 100644 --- a/docker/nginx/ubuntu-12.04/Dockerfile +++ b/docker/nginx/ubuntu-12.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:ubuntu-12.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/nginx/ubuntu-14.04/Dockerfile b/docker/nginx/ubuntu-14.04/Dockerfile index 014692dd8..c3ff8a282 100644 --- a/docker/nginx/ubuntu-14.04/Dockerfile +++ b/docker/nginx/ubuntu-14.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:ubuntu-14.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/nginx/ubuntu-15.04/Dockerfile b/docker/nginx/ubuntu-15.04/Dockerfile index 90f31844a..157a1a140 100644 --- a/docker/nginx/ubuntu-15.04/Dockerfile +++ b/docker/nginx/ubuntu-15.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:ubuntu-15.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/nginx/ubuntu-15.10/Dockerfile b/docker/nginx/ubuntu-15.10/Dockerfile index 01fb94123..355e25c28 100644 --- a/docker/nginx/ubuntu-15.10/Dockerfile +++ b/docker/nginx/ubuntu-15.10/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:ubuntu-15.10 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/nginx/ubuntu-16.04/Dockerfile b/docker/nginx/ubuntu-16.04/Dockerfile index 643e27417..39a1c2b7b 100644 --- a/docker/nginx/ubuntu-16.04/Dockerfile +++ b/docker/nginx/ubuntu-16.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:ubuntu-16.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-apache/alpine-3-php7/Dockerfile b/docker/php-apache/alpine-3-php7/Dockerfile new file mode 100644 index 000000000..0ae572146 --- /dev/null +++ b/docker/php-apache/alpine-3-php7/Dockerfile @@ -0,0 +1,35 @@ +#++++++++++++++++++++++++++++++++++++++ +# Alpine 3 PHP-Apache Docker container +#++++++++++++++++++++++++++++++++++++++ + +FROM webdevops/php:alpine-3-php7 +MAINTAINER info@webdevops.io +LABEL vendor=WebDevOps.io +LABEL io.webdevops.layout=6 +LABEL io.webdevops.version=0.23.0 + +ENV WEB_DOCUMENT_ROOT /app +ENV WEB_DOCUMENT_INDEX index.php +ENV WEB_ALIAS_DOMAIN *.vm + +# Install apache +RUN /usr/local/bin/apk-install \ + apache2 \ + apache2-utils \ + apache2-proxy \ + apache2-ssl \ + && sed -ri ' \ + s!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g; \ + s!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g; \ + ' /etc/apache2/httpd.conf + +# Deploy scripts/configurations +COPY conf/ /opt/docker/ +RUN bash /opt/docker/bin/control.sh provision.role.bootstrap webdevops-apache \ + && bash /opt/docker/bin/control.sh provision.role.bootstrap webdevops-php-apache \ + && bash /opt/docker/bin/bootstrap.sh + +EXPOSE 80 443 + +CMD ["supervisord"] + diff --git a/docker/php-apache/alpine-3-php7/conf/bin/service.d/httpd.sh b/docker/php-apache/alpine-3-php7/conf/bin/service.d/httpd.sh new file mode 100644 index 000000000..33f6f6ca2 --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/bin/service.d/httpd.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -e + +if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then + echo "" + echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!" + echo "" +fi + +# Apache gets grumpy about PID files pre-existing +rm -f /var/run/httpd/httpd.pid + +rpl --quiet "" "$WEB_DOCUMENT_INDEX" /opt/docker/etc/httpd/*.conf +rpl --quiet "" "$WEB_DOCUMENT_ROOT" /opt/docker/etc/httpd/*.conf +rpl --quiet "" "$WEB_ALIAS_DOMAIN" /opt/docker/etc/httpd/*.conf +rpl --quiet "" "$HOSTNAME" /opt/docker/etc/httpd/*.conf + +exec /usr/sbin/apachectl -DFOREGROUND diff --git a/docker/php-apache/alpine-3-php7/conf/etc/httpd/global.conf b/docker/php-apache/alpine-3-php7/conf/etc/httpd/global.conf new file mode 100644 index 000000000..080fe7816 --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/etc/httpd/global.conf @@ -0,0 +1,39 @@ +# Settings +TimeOut 1000 +ServerName "" + +DirectoryIndex +DocumentRoot "" + +"> + Options Indexes FollowSymLinks + AllowOverride All + + + Allow from all + + = 2.4> + Require all granted + + + + +LogFormat "[httpd:access] %V:%p %h %l %u %t \"%r\" %>s bytesIn:%I bytesOut:%O reqTime:%T" dockerlog +CustomLog /proc/self/fd/1 dockerlog +ErrorLog /proc/self/fd/2 + +####################################### +# Faster error documents +####################################### + + ErrorDocument 400 "400 Bad Request" + ErrorDocument 401 "401 Unauthorized" + ErrorDocument 403 "403 Forbidden" + ErrorDocument 404 "404 Not Found" + ErrorDocument 405 "405 Method Not Allowed" + + ErrorDocument 500 "500 Internal Server Error" + ErrorDocument 501 "501 Not Implemented" + ErrorDocument 502 "502 Bad Gateway" + ErrorDocument 503 "503 Service Unavailable" + diff --git a/docker/php-apache/alpine-3-php7/conf/etc/httpd/main.conf b/docker/php-apache/alpine-3-php7/conf/etc/httpd/main.conf new file mode 100644 index 000000000..5575b94e2 --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/etc/httpd/main.conf @@ -0,0 +1,3 @@ +Include /opt/docker/etc/httpd/global.conf +Include /opt/docker/etc/httpd/php.conf +Include /opt/docker/etc/httpd/vhost.conf diff --git a/docker/php-apache/alpine-3-php7/conf/etc/httpd/php.conf b/docker/php-apache/alpine-3-php7/conf/etc/httpd/php.conf new file mode 100644 index 000000000..bd4ff3971 --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/etc/httpd/php.conf @@ -0,0 +1,8 @@ + + + ProxySet connectiontimeout=5 timeout=600 + + + + SetHandler "proxy:fcgi://127.0.0.1:9000" + diff --git a/docker/php-apache/alpine-3-php7/conf/etc/httpd/ssl/server.crt b/docker/php-apache/alpine-3-php7/conf/etc/httpd/ssl/server.crt new file mode 100644 index 000000000..6b0694907 --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/etc/httpd/ssl/server.crt @@ -0,0 +1,28 @@ +-----BEGIN CERTIFICATE----- +MIIE1DCCArwCCQDMMwGnSuK0tTANBgkqhkiG9w0BAQsFADAsMRswGQYDVQQKExJE +b2NrZXIgQm9pbGVycGxhdGUxDTALBgNVBAMUBCoudm0wHhcNMTUwNTA0MTcxNDQw +WhcNMjUwNTAxMTcxNDQwWjAsMRswGQYDVQQKExJEb2NrZXIgQm9pbGVycGxhdGUx +DTALBgNVBAMUBCoudm0wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDK +3TIUiyDvXelWeY9VXMrpjuZtYpVSDsACLpjFUhMnsP5/iKT0VbeZyqHvmwZjAg4G +Y10d+yZDdgv/xeu0HPOFbtR6pCp10d1tdLHZto5Cyuxu7IQsAVjnD6Ko7XFwtNk7 +9o6JZfAFaGL4w5MokrVmCtspnsMZH7/7zU4f96cbF39zLopnpuXGD6t6DA8Qj3gy +0duaTjs42bYRN+rwLzVKAev99iQ4kPMJn4vV6/Xk6rtoSzC67GQyVZYaFypicD1S +NtsRmgEVvjCBDbrLOneUiRwff6qxEsZi7Hxv7BKFj4iUWnII7K/nP7T6uBHQjHO+ +FpsGkU9lCMrCeVFBe8kKz/cbhd+yLUxXwAPr6gSOPmwn232Gy4tozvqZHpbUxsgx +7sT3ej9K66h1D7J+BjNFWYM1hbnC1r7H/xS7EBzBV8qRoQCVe08Juf5xsouXFakD +clLV4+L+1cxkpwsCQDly5g3tm/TBqA2O+ZJ+YHQDHKkzMyhLs6i0X/M5qvJBiLg1 +GLTCS20rpQ5gXTEGuINqHgwXQWkUO6bhgSYqdHGX3zbZ5+qWpI4eui3dHZ1Ll0VH +6Icpb7ORTQwhc6W8KBlybssYPSlGOEBGUjYGNheoz9FpoSkxCis+P8ZNKtrmpPoq +Su0eOOGFOFHG02eOgPVxSwrDeN9MVJo7BPysGMHJmQIDAQABMA0GCSqGSIb3DQEB +CwUAA4ICAQC63g6NHmQKbiy3G6iaDkpUSbr5Mq2YgU61XnvWVyREqDcy/BXCw9oY +SJ/KUvCpqPnACNOFqjadRAmPiA9nf2WduoCgwQGV/YRFGswSuVvh/3X2TX5NWvbS +t8MQDttQg1dxpiMUjlu3rqhfohBdWJvp2lVSdpDb/MOlXBc/+p7HfOHwhqB7wwPN +NNbSKUbZqZxmD8cOf1X0hASr1yfFPj+2vST3ESaON8S0T2p63YX/sD5jvOUiEuyw +I5WcvLmiRZA07SH8nWyckLY3qWL+OlhSZrlAnolWS00b+7h5LNuRYEjKzwVgntoA +aCopyQih6wIk0+AfJO4sfhJBmQhnIrAaP/zwBH5g9zVizLf5H7U+hNXrMwgw55Sq +vjMdkZHvPKUXTvVit/rYE9H+PY3brkRWzOl4V/i/ZLJJm5805H/NyTbz9kPMJw2Q +nn+KOpfXXySD39f8iuRgSKXsYNul38hxWgcZZ6g+sOOp2n/VUmf0eZUWNnJ8i7AP +4Qif7aDKMcibOwSwsB+DKZXDvZ5XSdnMphtuLS5rPSL81rVRmWC2DMfQ2eP8j0WN +VTroSk0xedQ7Qr+9TNooi9IyzX6n1a2S1UiciEZ3ZcDbXPl/P01m+IYZyPnLv0+9 +ZeioZYh1JLv3/OKsMrMLTfh2ZCj3aXwmc2Owi/wU2LS5QUOMcHH7CQ== +-----END CERTIFICATE----- \ No newline at end of file diff --git a/docker/php-apache/alpine-3-php7/conf/etc/httpd/ssl/server.csr b/docker/php-apache/alpine-3-php7/conf/etc/httpd/ssl/server.csr new file mode 100644 index 000000000..8a9909f77 --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/etc/httpd/ssl/server.csr @@ -0,0 +1,26 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIEcTCCAlkCAQAwLDEbMBkGA1UEChMSRG9ja2VyIEJvaWxlcnBsYXRlMQ0wCwYD +VQQDFAQqLnZtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAyt0yFIsg +713pVnmPVVzK6Y7mbWKVUg7AAi6YxVITJ7D+f4ik9FW3mcqh75sGYwIOBmNdHfsm +Q3YL/8XrtBzzhW7UeqQqddHdbXSx2baOQsrsbuyELAFY5w+iqO1xcLTZO/aOiWXw +BWhi+MOTKJK1ZgrbKZ7DGR+/+81OH/enGxd/cy6KZ6blxg+regwPEI94MtHbmk47 +ONm2ETfq8C81SgHr/fYkOJDzCZ+L1ev15Oq7aEswuuxkMlWWGhcqYnA9UjbbEZoB +Fb4wgQ26yzp3lIkcH3+qsRLGYux8b+wShY+IlFpyCOyv5z+0+rgR0IxzvhabBpFP +ZQjKwnlRQXvJCs/3G4Xfsi1MV8AD6+oEjj5sJ9t9hsuLaM76mR6W1MbIMe7E93o/ +SuuodQ+yfgYzRVmDNYW5wta+x/8UuxAcwVfKkaEAlXtPCbn+cbKLlxWpA3JS1ePi +/tXMZKcLAkA5cuYN7Zv0wagNjvmSfmB0AxypMzMoS7OotF/zOaryQYi4NRi0wktt +K6UOYF0xBriDah4MF0FpFDum4YEmKnRxl9822efqlqSOHrot3R2dS5dFR+iHKW+z +kU0MIXOlvCgZcm7LGD0pRjhARlI2BjYXqM/RaaEpMQorPj/GTSra5qT6KkrtHjjh +hThRxtNnjoD1cUsKw3jfTFSaOwT8rBjByZkCAwEAAaAAMA0GCSqGSIb3DQEBCwUA +A4ICAQBsEBgC2YepuZq/8UqvKMZKVy/etDKXj7BB+QPb+leNiKD7p4LDxHJsZSH8 +Ku9uMPeLfiQDn5jA41k5SlGttzvObd65RdEbO3yHpqsg05EGSDDLfaE1k2Al/qmX +/o8roPZF7+2kZthgMAgkcokS54LYqEYTGqOf3J9Ss0yRIZwhaOVebfFIbIOdpw0B +JNMIJPHTMdZrcuRVI+wR1uPLIlEJzBvxTGbTrvPU25WJFtu+EajKqXO0SHdy0yx8 +uH4ykRBJRc36+oYo7nZ5D56dh7pZn3+9J64FKAOV0Q3KqMFieGy053ezuhJd70eZ +UozTgfjs3WpMzoYmKETSyl3XZSdInRe+sUlKPruTsKyg69oYxjPlrGfAmmGcCFca +TnZinT18dI92zK7OtOVkmYeYKC1lwuhftVrNMXzZuHOGpS9NNYtc4nDqDMIEOfV3 +6rCdu03WjEgJ+Z67tJs16xOx9du4/EHxS2Ijn9DPfVJvYy0TgzDi1BUpjWx0KTLx +C4OQbEZ/QTWmHVbSch/hcZhzbf7SNh5RpnW4EtmcpDFjIKMfxJmoKeiTf7qnilx0 +7uRvsZFKoDKRDOFiPfgMg5AOtLHziYsd9m0tJjC2GHvFuPjzOtzhnUUjmmvht170 +2aqKakjST4amg7jzLcs871HX0/WjOtt29NpOz140blkKf1bisg== +-----END CERTIFICATE REQUEST----- \ No newline at end of file diff --git a/docker/php-apache/alpine-3-php7/conf/etc/httpd/ssl/server.key b/docker/php-apache/alpine-3-php7/conf/etc/httpd/ssl/server.key new file mode 100644 index 000000000..c9eec145f --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/etc/httpd/ssl/server.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKAIBAAKCAgEAyt0yFIsg713pVnmPVVzK6Y7mbWKVUg7AAi6YxVITJ7D+f4ik +9FW3mcqh75sGYwIOBmNdHfsmQ3YL/8XrtBzzhW7UeqQqddHdbXSx2baOQsrsbuyE +LAFY5w+iqO1xcLTZO/aOiWXwBWhi+MOTKJK1ZgrbKZ7DGR+/+81OH/enGxd/cy6K +Z6blxg+regwPEI94MtHbmk47ONm2ETfq8C81SgHr/fYkOJDzCZ+L1ev15Oq7aEsw +uuxkMlWWGhcqYnA9UjbbEZoBFb4wgQ26yzp3lIkcH3+qsRLGYux8b+wShY+IlFpy +COyv5z+0+rgR0IxzvhabBpFPZQjKwnlRQXvJCs/3G4Xfsi1MV8AD6+oEjj5sJ9t9 +hsuLaM76mR6W1MbIMe7E93o/SuuodQ+yfgYzRVmDNYW5wta+x/8UuxAcwVfKkaEA +lXtPCbn+cbKLlxWpA3JS1ePi/tXMZKcLAkA5cuYN7Zv0wagNjvmSfmB0AxypMzMo +S7OotF/zOaryQYi4NRi0wkttK6UOYF0xBriDah4MF0FpFDum4YEmKnRxl9822efq +lqSOHrot3R2dS5dFR+iHKW+zkU0MIXOlvCgZcm7LGD0pRjhARlI2BjYXqM/RaaEp +MQorPj/GTSra5qT6KkrtHjjhhThRxtNnjoD1cUsKw3jfTFSaOwT8rBjByZkCAwEA +AQKCAgAbZPdoUsllyZbC+LNkYZ19ILD5QIDNjfRb1xMGQmkXyQz1B+zOmeyrNfPc +OWEJabOfJTfj3pByN7SzG3US4333HNpQnW6mbmqqZ0HFFqPrXR/Ecuf+UUhCG5hp +m3bgM2vKbyccYsmg0VHcKfzrU7RvTTP/UNMjx2fThwvvwS+ttuSdF0HVcXJB5sfP +OWWnZNhkdHZlRf81VCED/jsZqCZYEh5eMyj9AoXvXL4zayPPf+tC0DSKaXW2Xlxg +tZQhqup8+a9nlxZia0Z9hu8clo6jXkiP8FuKgfCMV0cOjiCKLLHS5svTbLLsVWwJ +F2ZAdVcD6mWQ43qHOEK5NEzGvQKO14CaOLnVT2yAkMcyNohsEgoDP9oCBGDJQbBH +NmtZfpVjjtuTr9P9TEkU1FcBRo0x6Il/DkzamGbOeFAmgnaGElhJ5c/CAG7whaIf +mUfFOBGPH/wESY3gBOACDofeSh27RrlvbLaPiCGKivDUTBmhBsIuso6XqOKbvtfV +/HhhndpdRVfIj4DdE7gIrLIGN977JMVAXFCNz7KrvAWwcOXrCHCoWpklJ9repq8l +26ICY8K7VXktzDHQUmhd88ZWR+9ASURsJghUgZUOcMrEGyvci6Y8hpLhHiNVPHuQ ++ps7tpPsXSntBUqWBzhRZh74+nJlOOV6oYykl30JT2JzB6lwiQKCAQEA9ecn8N2z +20tR2UEiTv/MjVSepQtAAajegvcd1iasvvQKXnh3XLmoZHzH2tTa0lp5RIZpUQPl +lOTwko0lYTBnYblt65AJQ3FTgisNobIpoqE8BFXLm6wggz7CbabjmPGDe173lPGR +sI0YSKYvzrdn4zw8Fh6WULJyZHLi58zJYL3r0WBDiOoxpGaGA1GlmkuIWjhKHaX2 +OvF1vOuQDJ2eDyTc5TYFC0NKG76Mvanov5L/yrhNM/umbmp0SPspzHGZobAKUr20 +OazFT8S+2TA1OTxWNbiPbSimFoaZbEdqsNACGfVJWO8Sh8iqlt5RmEcSiSvGBj6L +QKprRO9Fsp2GawKCAQEA0zGhRsnux4JTNsdUSYsEJtITMj6eE+nl7CoZ9DAOwC5X +6/aSpUE4TT+pWNrt9iluXiGL0j89UJ7r/L1OcsiyzGb8ig9NU4zr1NIGTZ0DstHi +HPYINjeiBJEFIy17kOQn+9/I5c4hBUwz6ihwNoEomymVB/EsLJKAML0AudJGKg+Z +/f/qrS40eab5SAiaKgsh0MZnj+vIxyGBydt6r2HGmjfNITVbXIu6IpO+6NXDwM/e +7v10AAZ3j9+gb1RedLg2ghuIuYU90hmMhtVWsh9nVmaOkMW9/WFgOPYvt/mHH/hR +d4pePZ9kACGmqo/b9sHvHw1YEubtCt1VUiNuFxnJCwKCAQBWnxz0vkRTJY8phsY9 +KeK2jm5sGTBs5T2syLwb6ffENFdKvAjgAw6Mh2And/+1ReWd+/MxdLv03UjZdxsJ +x3FDfXx5FH4O4ebW3a+pnAcKoN1xcX+N0O6LDRqUYcue3sTAOs3gC9CUbr91KAWD +Phw8ccWAzTmKJ7IgLFA982ekyoI9eTmRC159WRgwJxy844qerWF+XC4GyXP+HsTZ +jNRW5Vdi7sqMEyIR7+fIEAhLI88zbATWIPmZv6pC4ybwO7wwtsCMMQNBpdjDprzL +6S12ggikV+U+QKlxGe0FtYqhykRTPJKf32eZqVheWOZJTA/9fgv9ux52oxGycM8O +gmsNAoIBAQC60m5uZnd5uYnPLWkcXYNgq/kbO1UvHHut/FhVMKX7z4MrU0XKNfWO +MECoP5K9bU0aq+Y6KIMe7FapjvT0iSHRu1Cu+HZY8JI2A0xcIAeDijLRl7sP6wrB +q1+2DKgANjRAlWfsEfoX658JBpitPngjOheBnRCMpVQMyUT5HE/BKWf5zwdUB0mY +S+K8nA90HcDeJIS8RcGolbVwUV0oBABhr/cf50lYhqozqCr7YQ33ZGs7Uq3oz8+4 +UARmN2YPLl3Znm3GX12em8c6B0LX8vvA7Jw06Rf2Ksup1+3Ce1PTLiEy9A4FyRf3 +Hc2HmBbnJAtZlr5QikMqlzzAmmLqwH6dAoIBAC+ryaQGJFsijCSuaDfRp/uy9xnd +DjgMdTwjl5WLBmyudChVMANl8eqCbvVO41CN84yORk03oQ4cx0eKxAZaLaSzgkb3 +W0X2nFQe7VJSYMQswCQ+1WfJvEFrIdkEKIa//uQdhqNrgUKSNVhhSTMbNEkDTIWn +ssbv2H9hvUaFt/J/vP9zCKuU5oYvNU7Oi6ZXRYezRn9atlJYanLFoJnHUBRzGms5 +K0vhdCPDXQq87z5Yudoh0jLUQF9Nx0GTWeBceQ9n5hZeRUNQWxP4AJThQX9KSPTS +mbL3Kh4XNRmAUJ2N+Njh+3dg91s+JkKvC1wcspLsmLPQe+9AxBSH9y5JE/8= +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/docker/php-apache/alpine-3-php7/conf/etc/httpd/vhost.common.conf b/docker/php-apache/alpine-3-php7/conf/etc/httpd/vhost.common.conf new file mode 100644 index 000000000..e69de29bb diff --git a/docker/php-apache/alpine-3-php7/conf/etc/httpd/vhost.conf b/docker/php-apache/alpine-3-php7/conf/etc/httpd/vhost.conf new file mode 100644 index 000000000..fb15ccda8 --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/etc/httpd/vhost.conf @@ -0,0 +1,23 @@ +####################################### +# Vhost +####################################### + + + ServerName docker.vm + ServerAlias + DocumentRoot "" + + UseCanonicalName Off + + Include /opt/docker/etc/httpd/vhost.common.conf + + + + ServerName docker.vm + ServerAlias + DocumentRoot "" + + UseCanonicalName Off + Include /opt/docker/etc/httpd/vhost.common.conf + Include /opt/docker/etc/httpd/vhost.ssl.conf + diff --git a/docker/php-apache/alpine-3-php7/conf/etc/httpd/vhost.ssl.conf b/docker/php-apache/alpine-3-php7/conf/etc/httpd/vhost.ssl.conf new file mode 100644 index 000000000..1261fd747 --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/etc/httpd/vhost.ssl.conf @@ -0,0 +1,27 @@ + ############ + # SSL + ############ + + SSLEngine on + SSLCertificateFile /opt/docker/etc/httpd/ssl/server.crt + SSLCertificateKeyFile /opt/docker/etc/httpd/ssl/server.key + + + SSLOptions +StdEnvVars + + + SSLOptions +StdEnvVars + + + BrowserMatch "MSIE [2-6]" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 + # MSIE 7 and newer should be able to use keepalive + # This regexp is ok with 17-9! + BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown + + ## SSL Hardening + SSLProtocol All -SSLv2 -SSLv3 + SSLHonorCipherOrder on + SSLCompression off + SSLCipherSuite 'EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA' diff --git a/docker/php-apache/alpine-3-php7/conf/etc/supervisor.d/apache.conf b/docker/php-apache/alpine-3-php7/conf/etc/supervisor.d/apache.conf new file mode 100644 index 000000000..12a6f86f7 --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/etc/supervisor.d/apache.conf @@ -0,0 +1,14 @@ +[group:apache] +programs=apached +priority=20 + +[program:apached] +command = /opt/docker/bin/service.d/httpd.sh +process_name=%(program_name)s +startsecs = 0 +autostart = true +autorestart = true +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 diff --git a/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-apache/defaults/main.yml b/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-apache/defaults/main.yml new file mode 100644 index 000000000..69cba1cb4 --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-apache/defaults/main.yml @@ -0,0 +1,3 @@ +--- + +DOCUMENT_ROOT: "{{ lookup('env','WEB_DOCUMENT_ROOT') }}" diff --git a/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-apache/tasks/bootstrap.yml b/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-apache/tasks/bootstrap.yml new file mode 100644 index 000000000..8e60c0ba5 --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-apache/tasks/bootstrap.yml @@ -0,0 +1,114 @@ +--- + +- name: Set apache vhost file [RedHat family] + set_fact: + apache_docker_vhost: /etc/httpd/conf.d/docker.conf + when: ansible_os_family == 'RedHat' + +- name: Set apache vhost file [Debian family] + set_fact: + apache_docker_vhost: /etc/apache2/sites-enabled/10-docker.conf + when: ansible_os_family == 'Debian' + +- name: Set apache vhost file [Alpine family] + set_fact: + apache_docker_vhost: /etc/apache2/conf.d/docker.conf + when: ansible_os_family == 'Alpine' + +- name: Enable apache main config + file: + src: '/opt/docker/etc/httpd/main.conf' + dest: '{{ apache_docker_vhost }}' + state: link + force: yes + +- name: Ensure document root is available + file: + path: "{{ DOCUMENT_ROOT }}" + state: directory + recurse: yes + +- name: Ensure /var/run/apache2 exists + file: + path: '/var/run/apache2' + state: directory + recurse: yes + +- name: Ensure /run/apache2 exists + file: + path: '/run/apache2' + state: directory + recurse: yes + when: ansible_os_family == 'Alpine' + +- name: Switch MPM to worker [RedHat family] + lineinfile: + dest: '/etc/httpd/conf.modules.d/00-mpm.conf' + regexp: '^[\s#]*{{ item.line }}' + line: '{{ item.prefix }}{{ item.line }}' + with_items: + - { line: 'LoadModule mpm_prefork_module modules/mod_mpm_prefork.so', prefix: "#" } + - { line: 'LoadModule mpm_event_module modules/mod_mpm_event.so', prefix: "" } + when: ansible_os_family == 'RedHat' + +- name: Switch MPM to event for Apache 2.4 and higher [Ubuntu family] + command: "{{ item }}" + with_items: + - 'a2dismod mpm_event' + - 'a2enmod mpm_event' + when: (ansible_distribution == 'Ubuntu' and ansible_lsb.major_release|int >= 14) or (ansible_distribution == 'Debian' and ansible_lsb.major_release|int >= 8) + +- name: Manage modules [Alpine family] + lineinfile: + dest: '/etc/apache2/httpd.conf' + regexp: '^[\s#]*{{ item.line }}' + line: '{{ item.prefix }}{{ item.line }}' + with_items: + - { line: 'LoadModule mpm_prefork_module modules/mod_mpm_prefork.so', prefix: "#" } + - { line: 'LoadModule mpm_event_module modules/mod_mpm_event.so', prefix: "" } + - { line: 'LoadModule deflate_module modules/mod_deflate.so', prefix: "" } + - { line: 'LoadModule rewrite_module modules/mod_rewrite.so', prefix: "" } + - { line: 'LoadModule logio_module modules/mod_logio.so', prefix: "" } + - { line: 'LoadModule slotmem_shm_module modules/mod_slotmem_shm.so', prefix: "" } + - { line: 'LoadModule actions_module modules/mod_actions.so', prefix: "" } + when: ansible_os_family == 'Alpine' + +- name: Fix ssl support [Alpine family] + lineinfile: + dest: '/etc/apache2/conf.d/ssl.conf' + regexp: '{{ item.regexp }}' + line: '{{ item.line }}' + with_items: + - { regexp: 'LoadModule ssl_module', line: 'LoadModule ssl_module /usr/lib/apache2/mod_ssl.so' } + - { regexp: 'LoadModule socache_shmcb_module', line: 'LoadModule socache_shmcb_module /usr/lib/apache2/mod_socache_shmcb.so' } + when: ansible_os_family == 'Alpine' + +- name: Disable proxy [Alpine family] + lineinfile: + dest: '/etc/apache2/conf.d/proxy.conf' + regexp: '^[\s#]*{{ item.line }}' + line: '{{ item.prefix }}{{ item.line }}' + with_items: + - { line: 'LoadModule proxy_ajp_module modules/mod_proxy_ajp.so', prefix: "#" } + - { line: 'LoadModule proxy_connect_module modules/mod_proxy_connect.so', prefix: "#" } + - { line: 'LoadModule proxy_balancer_module modules/mod_proxy_balancer.so', prefix: "#" } + - { line: 'LoadModule proxy_express_module modules/mod_proxy_express.so', prefix: "#" } + - { line: 'LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so', prefix: "" } + - { line: 'LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so', prefix: "#" } + - { line: 'LoadModule proxy_ftp_module modules/mod_proxy_ftp.so', prefix: "#" } + - { line: 'LoadModule proxy_http_module modules/mod_proxy_http.so', prefix: "#" } + - { line: 'LoadModule proxy_scgi_module modules/mod_proxy_scgi.so', prefix: "#" } + when: ansible_os_family == 'Alpine' + +- name: Fix rights of ssl files + file: + path: "{{ item.path }}" + state: "{{ item.state }}" + mode: "{{ item.mode }}" + owner: "root" + group: "root" + with_items: + - { path: '/opt/docker/etc/httpd/ssl', state: 'directory', mode: '0750' } + - { 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' } diff --git a/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-apache/tasks/main.yml b/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-apache/tasks/main.yml new file mode 100644 index 000000000..1806c1a8c --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-apache/tasks/main.yml @@ -0,0 +1,5 @@ +--- + +- include: bootstrap.yml + tags: + - bootstrap diff --git a/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-php-apache/defaults/main.yml b/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-php-apache/defaults/main.yml new file mode 100644 index 000000000..ed97d539c --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-php-apache/defaults/main.yml @@ -0,0 +1 @@ +--- diff --git a/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-php-apache/tasks/bootstrap.yml b/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-php-apache/tasks/bootstrap.yml new file mode 100644 index 000000000..ad5fb2121 --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-php-apache/tasks/bootstrap.yml @@ -0,0 +1,8 @@ +--- +- name: Restrict php-fpm to local connection + lineinfile: + dest: '/opt/docker/etc/php/fpm/pool.d/application.conf' + regexp: '^[\s;]*{{ item.key }}[\s]*=' + line: '{{ item.key }} = {{ item.value }}' + with_items: + - { key: 'listen', value: "127.0.0.1:9000" } diff --git a/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-php-apache/tasks/entrypoint.yml b/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-php-apache/tasks/entrypoint.yml new file mode 100644 index 000000000..cd21505a4 --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-php-apache/tasks/entrypoint.yml @@ -0,0 +1,2 @@ +--- + diff --git a/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-php-apache/tasks/main.yml b/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-php-apache/tasks/main.yml new file mode 100644 index 000000000..7895a52a9 --- /dev/null +++ b/docker/php-apache/alpine-3-php7/conf/provision/roles/webdevops-php-apache/tasks/main.yml @@ -0,0 +1,9 @@ +--- + +- include: bootstrap.yml + tags: + - bootstrap + +- include: entrypoint.yml + tags: + - entrypoint diff --git a/docker/php-apache/alpine-3/Dockerfile b/docker/php-apache/alpine-3/Dockerfile index 5ff7a7c3d..203ceba40 100644 --- a/docker/php-apache/alpine-3/Dockerfile +++ b/docker/php-apache/alpine-3/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:alpine-3 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-apache/centos-7/Dockerfile b/docker/php-apache/centos-7/Dockerfile index d62b3903c..cd0224f2c 100644 --- a/docker/php-apache/centos-7/Dockerfile +++ b/docker/php-apache/centos-7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:centos-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-apache/debian-7/Dockerfile b/docker/php-apache/debian-7/Dockerfile index ac1417c60..98fbdbfc9 100644 --- a/docker/php-apache/debian-7/Dockerfile +++ b/docker/php-apache/debian-7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:debian-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-apache/debian-8-php7/Dockerfile b/docker/php-apache/debian-8-php7/Dockerfile index 63ec617bd..c8de79d1f 100644 --- a/docker/php-apache/debian-8-php7/Dockerfile +++ b/docker/php-apache/debian-8-php7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:debian-8-php7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-apache/debian-8/Dockerfile b/docker/php-apache/debian-8/Dockerfile index 30cdfd25a..417641b03 100644 --- a/docker/php-apache/debian-8/Dockerfile +++ b/docker/php-apache/debian-8/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:debian-8 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-apache/debian-9-php7/Dockerfile b/docker/php-apache/debian-9-php7/Dockerfile index daea2bd92..d28b071df 100644 --- a/docker/php-apache/debian-9-php7/Dockerfile +++ b/docker/php-apache/debian-9-php7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:debian-9-php7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-apache/debian-9/Dockerfile b/docker/php-apache/debian-9/Dockerfile index df22c5295..37da6cdc0 100644 --- a/docker/php-apache/debian-9/Dockerfile +++ b/docker/php-apache/debian-9/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:debian-9 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-apache/ubuntu-12.04/Dockerfile b/docker/php-apache/ubuntu-12.04/Dockerfile index 16b56abfc..1f9a3cba9 100644 --- a/docker/php-apache/ubuntu-12.04/Dockerfile +++ b/docker/php-apache/ubuntu-12.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:ubuntu-12.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-apache/ubuntu-14.04/Dockerfile b/docker/php-apache/ubuntu-14.04/Dockerfile index d54481a20..42fae7b88 100644 --- a/docker/php-apache/ubuntu-14.04/Dockerfile +++ b/docker/php-apache/ubuntu-14.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:ubuntu-14.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-apache/ubuntu-15.04/Dockerfile b/docker/php-apache/ubuntu-15.04/Dockerfile index 4ffda1080..d8a376f84 100644 --- a/docker/php-apache/ubuntu-15.04/Dockerfile +++ b/docker/php-apache/ubuntu-15.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:ubuntu-15.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-apache/ubuntu-15.10/Dockerfile b/docker/php-apache/ubuntu-15.10/Dockerfile index 5fc67611f..34bb78d08 100644 --- a/docker/php-apache/ubuntu-15.10/Dockerfile +++ b/docker/php-apache/ubuntu-15.10/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:ubuntu-15.10 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-apache/ubuntu-16.04-php7/Dockerfile b/docker/php-apache/ubuntu-16.04-php7/Dockerfile index fab639ed2..8a3dbf772 100644 --- a/docker/php-apache/ubuntu-16.04-php7/Dockerfile +++ b/docker/php-apache/ubuntu-16.04-php7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:ubuntu-16.04-php7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-apache/ubuntu-16.04/Dockerfile b/docker/php-apache/ubuntu-16.04/Dockerfile index 02a441362..d91b20df9 100644 --- a/docker/php-apache/ubuntu-16.04/Dockerfile +++ b/docker/php-apache/ubuntu-16.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:ubuntu-16.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-nginx/alpine-3-php7/Dockerfile b/docker/php-nginx/alpine-3-php7/Dockerfile new file mode 100644 index 000000000..8581edc04 --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/Dockerfile @@ -0,0 +1,27 @@ +#++++++++++++++++++++++++++++++++++++++ +# Alpine PHP-Nginx Docker container +#++++++++++++++++++++++++++++++++++++++ + +FROM webdevops/php:alpine-3-php7 +MAINTAINER info@webdevops.io +LABEL vendor=WebDevOps.io +LABEL io.webdevops.layout=6 +LABEL io.webdevops.version=0.23.0 + +ENV WEB_DOCUMENT_ROOT /app +ENV WEB_DOCUMENT_INDEX index.php +ENV WEB_ALIAS_DOMAIN *.vm + +# Install nginx +RUN /usr/local/bin/apk-install \ + nginx + +# Deploy scripts/configurations +COPY conf/ /opt/docker/ +RUN bash /opt/docker/bin/control.sh provision.role.bootstrap webdevops-nginx \ + && bash /opt/docker/bin/control.sh provision.role.bootstrap webdevops-php-nginx \ + && bash /opt/docker/bin/bootstrap.sh + +EXPOSE 80 443 + +CMD ["supervisord"] diff --git a/docker/php-nginx/alpine-3-php7/conf/bin/service.d/nginx.sh b/docker/php-nginx/alpine-3-php7/conf/bin/service.d/nginx.sh new file mode 100644 index 000000000..a28a005c2 --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/bin/service.d/nginx.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -e + +if [[ ! -e "$WEB_DOCUMENT_ROOT" ]]; then + echo "" + echo "[WARNING] WEB_DOCUMENT_ROOT does not exists with path \"$WEB_DOCUMENT_ROOT\"!" + echo "" +fi + +rpl --quiet "" "$WEB_DOCUMENT_INDEX" /opt/docker/etc/nginx/*.conf +rpl --quiet "" "$WEB_DOCUMENT_ROOT" /opt/docker/etc/nginx/*.conf +rpl --quiet "" "$WEB_ALIAS_DOMAIN" /opt/docker/etc/nginx/*.conf +rpl --quiet "" "$HOSTNAME" /opt/docker/etc/nginx/*.conf + +exec /usr/sbin/nginx diff --git a/docker/php-nginx/alpine-3-php7/conf/etc/nginx/global.conf b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/global.conf new file mode 100644 index 000000000..e69de29bb diff --git a/docker/php-nginx/alpine-3-php7/conf/etc/nginx/main.conf b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/main.conf new file mode 100644 index 000000000..517102d09 --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/main.conf @@ -0,0 +1,6 @@ +include /opt/docker/etc/nginx/global.conf; +include /opt/docker/etc/nginx/php.conf; +include /opt/docker/etc/nginx/vhost.conf; + + + diff --git a/docker/php-nginx/alpine-3-php7/conf/etc/nginx/nginx.conf b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/nginx.conf new file mode 100644 index 000000000..f5609826d --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/nginx.conf @@ -0,0 +1,35 @@ +# For more information on configuration, see: +# * Official English Documentation: http://nginx.org/en/docs/ +# * Official Russian Documentation: http://nginx.org/ru/docs/ + +user nginx; +worker_processes auto; +error_log /var/log/nginx/error.log; +pid /run/nginx.pid; + +events { + worker_connections 1024; +} + +http { + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + 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; + + # Load modular configuration files from the /etc/nginx/conf.d directory. + # See http://nginx.org/en/docs/ngx_core_module.html#include + # for more information. + include /etc/nginx/conf.d/*.conf; +} +daemon off; diff --git a/docker/php-nginx/alpine-3-php7/conf/etc/nginx/php.conf b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/php.conf new file mode 100644 index 000000000..4cdbc305f --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/php.conf @@ -0,0 +1,3 @@ +upstream php { + server 127.0.0.1:9000; +} diff --git a/docker/php-nginx/alpine-3-php7/conf/etc/nginx/ssl/server.crt b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/ssl/server.crt new file mode 100644 index 000000000..6b0694907 --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/ssl/server.crt @@ -0,0 +1,28 @@ +-----BEGIN CERTIFICATE----- +MIIE1DCCArwCCQDMMwGnSuK0tTANBgkqhkiG9w0BAQsFADAsMRswGQYDVQQKExJE +b2NrZXIgQm9pbGVycGxhdGUxDTALBgNVBAMUBCoudm0wHhcNMTUwNTA0MTcxNDQw +WhcNMjUwNTAxMTcxNDQwWjAsMRswGQYDVQQKExJEb2NrZXIgQm9pbGVycGxhdGUx +DTALBgNVBAMUBCoudm0wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDK +3TIUiyDvXelWeY9VXMrpjuZtYpVSDsACLpjFUhMnsP5/iKT0VbeZyqHvmwZjAg4G +Y10d+yZDdgv/xeu0HPOFbtR6pCp10d1tdLHZto5Cyuxu7IQsAVjnD6Ko7XFwtNk7 +9o6JZfAFaGL4w5MokrVmCtspnsMZH7/7zU4f96cbF39zLopnpuXGD6t6DA8Qj3gy +0duaTjs42bYRN+rwLzVKAev99iQ4kPMJn4vV6/Xk6rtoSzC67GQyVZYaFypicD1S +NtsRmgEVvjCBDbrLOneUiRwff6qxEsZi7Hxv7BKFj4iUWnII7K/nP7T6uBHQjHO+ +FpsGkU9lCMrCeVFBe8kKz/cbhd+yLUxXwAPr6gSOPmwn232Gy4tozvqZHpbUxsgx +7sT3ej9K66h1D7J+BjNFWYM1hbnC1r7H/xS7EBzBV8qRoQCVe08Juf5xsouXFakD +clLV4+L+1cxkpwsCQDly5g3tm/TBqA2O+ZJ+YHQDHKkzMyhLs6i0X/M5qvJBiLg1 +GLTCS20rpQ5gXTEGuINqHgwXQWkUO6bhgSYqdHGX3zbZ5+qWpI4eui3dHZ1Ll0VH +6Icpb7ORTQwhc6W8KBlybssYPSlGOEBGUjYGNheoz9FpoSkxCis+P8ZNKtrmpPoq +Su0eOOGFOFHG02eOgPVxSwrDeN9MVJo7BPysGMHJmQIDAQABMA0GCSqGSIb3DQEB +CwUAA4ICAQC63g6NHmQKbiy3G6iaDkpUSbr5Mq2YgU61XnvWVyREqDcy/BXCw9oY +SJ/KUvCpqPnACNOFqjadRAmPiA9nf2WduoCgwQGV/YRFGswSuVvh/3X2TX5NWvbS +t8MQDttQg1dxpiMUjlu3rqhfohBdWJvp2lVSdpDb/MOlXBc/+p7HfOHwhqB7wwPN +NNbSKUbZqZxmD8cOf1X0hASr1yfFPj+2vST3ESaON8S0T2p63YX/sD5jvOUiEuyw +I5WcvLmiRZA07SH8nWyckLY3qWL+OlhSZrlAnolWS00b+7h5LNuRYEjKzwVgntoA +aCopyQih6wIk0+AfJO4sfhJBmQhnIrAaP/zwBH5g9zVizLf5H7U+hNXrMwgw55Sq +vjMdkZHvPKUXTvVit/rYE9H+PY3brkRWzOl4V/i/ZLJJm5805H/NyTbz9kPMJw2Q +nn+KOpfXXySD39f8iuRgSKXsYNul38hxWgcZZ6g+sOOp2n/VUmf0eZUWNnJ8i7AP +4Qif7aDKMcibOwSwsB+DKZXDvZ5XSdnMphtuLS5rPSL81rVRmWC2DMfQ2eP8j0WN +VTroSk0xedQ7Qr+9TNooi9IyzX6n1a2S1UiciEZ3ZcDbXPl/P01m+IYZyPnLv0+9 +ZeioZYh1JLv3/OKsMrMLTfh2ZCj3aXwmc2Owi/wU2LS5QUOMcHH7CQ== +-----END CERTIFICATE----- \ No newline at end of file diff --git a/docker/php-nginx/alpine-3-php7/conf/etc/nginx/ssl/server.csr b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/ssl/server.csr new file mode 100644 index 000000000..8a9909f77 --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/ssl/server.csr @@ -0,0 +1,26 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIEcTCCAlkCAQAwLDEbMBkGA1UEChMSRG9ja2VyIEJvaWxlcnBsYXRlMQ0wCwYD +VQQDFAQqLnZtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAyt0yFIsg +713pVnmPVVzK6Y7mbWKVUg7AAi6YxVITJ7D+f4ik9FW3mcqh75sGYwIOBmNdHfsm +Q3YL/8XrtBzzhW7UeqQqddHdbXSx2baOQsrsbuyELAFY5w+iqO1xcLTZO/aOiWXw +BWhi+MOTKJK1ZgrbKZ7DGR+/+81OH/enGxd/cy6KZ6blxg+regwPEI94MtHbmk47 +ONm2ETfq8C81SgHr/fYkOJDzCZ+L1ev15Oq7aEswuuxkMlWWGhcqYnA9UjbbEZoB +Fb4wgQ26yzp3lIkcH3+qsRLGYux8b+wShY+IlFpyCOyv5z+0+rgR0IxzvhabBpFP +ZQjKwnlRQXvJCs/3G4Xfsi1MV8AD6+oEjj5sJ9t9hsuLaM76mR6W1MbIMe7E93o/ +SuuodQ+yfgYzRVmDNYW5wta+x/8UuxAcwVfKkaEAlXtPCbn+cbKLlxWpA3JS1ePi +/tXMZKcLAkA5cuYN7Zv0wagNjvmSfmB0AxypMzMoS7OotF/zOaryQYi4NRi0wktt +K6UOYF0xBriDah4MF0FpFDum4YEmKnRxl9822efqlqSOHrot3R2dS5dFR+iHKW+z +kU0MIXOlvCgZcm7LGD0pRjhARlI2BjYXqM/RaaEpMQorPj/GTSra5qT6KkrtHjjh +hThRxtNnjoD1cUsKw3jfTFSaOwT8rBjByZkCAwEAAaAAMA0GCSqGSIb3DQEBCwUA +A4ICAQBsEBgC2YepuZq/8UqvKMZKVy/etDKXj7BB+QPb+leNiKD7p4LDxHJsZSH8 +Ku9uMPeLfiQDn5jA41k5SlGttzvObd65RdEbO3yHpqsg05EGSDDLfaE1k2Al/qmX +/o8roPZF7+2kZthgMAgkcokS54LYqEYTGqOf3J9Ss0yRIZwhaOVebfFIbIOdpw0B +JNMIJPHTMdZrcuRVI+wR1uPLIlEJzBvxTGbTrvPU25WJFtu+EajKqXO0SHdy0yx8 +uH4ykRBJRc36+oYo7nZ5D56dh7pZn3+9J64FKAOV0Q3KqMFieGy053ezuhJd70eZ +UozTgfjs3WpMzoYmKETSyl3XZSdInRe+sUlKPruTsKyg69oYxjPlrGfAmmGcCFca +TnZinT18dI92zK7OtOVkmYeYKC1lwuhftVrNMXzZuHOGpS9NNYtc4nDqDMIEOfV3 +6rCdu03WjEgJ+Z67tJs16xOx9du4/EHxS2Ijn9DPfVJvYy0TgzDi1BUpjWx0KTLx +C4OQbEZ/QTWmHVbSch/hcZhzbf7SNh5RpnW4EtmcpDFjIKMfxJmoKeiTf7qnilx0 +7uRvsZFKoDKRDOFiPfgMg5AOtLHziYsd9m0tJjC2GHvFuPjzOtzhnUUjmmvht170 +2aqKakjST4amg7jzLcs871HX0/WjOtt29NpOz140blkKf1bisg== +-----END CERTIFICATE REQUEST----- \ No newline at end of file diff --git a/docker/php-nginx/alpine-3-php7/conf/etc/nginx/ssl/server.key b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/ssl/server.key new file mode 100644 index 000000000..c9eec145f --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/ssl/server.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKAIBAAKCAgEAyt0yFIsg713pVnmPVVzK6Y7mbWKVUg7AAi6YxVITJ7D+f4ik +9FW3mcqh75sGYwIOBmNdHfsmQ3YL/8XrtBzzhW7UeqQqddHdbXSx2baOQsrsbuyE +LAFY5w+iqO1xcLTZO/aOiWXwBWhi+MOTKJK1ZgrbKZ7DGR+/+81OH/enGxd/cy6K +Z6blxg+regwPEI94MtHbmk47ONm2ETfq8C81SgHr/fYkOJDzCZ+L1ev15Oq7aEsw +uuxkMlWWGhcqYnA9UjbbEZoBFb4wgQ26yzp3lIkcH3+qsRLGYux8b+wShY+IlFpy +COyv5z+0+rgR0IxzvhabBpFPZQjKwnlRQXvJCs/3G4Xfsi1MV8AD6+oEjj5sJ9t9 +hsuLaM76mR6W1MbIMe7E93o/SuuodQ+yfgYzRVmDNYW5wta+x/8UuxAcwVfKkaEA +lXtPCbn+cbKLlxWpA3JS1ePi/tXMZKcLAkA5cuYN7Zv0wagNjvmSfmB0AxypMzMo +S7OotF/zOaryQYi4NRi0wkttK6UOYF0xBriDah4MF0FpFDum4YEmKnRxl9822efq +lqSOHrot3R2dS5dFR+iHKW+zkU0MIXOlvCgZcm7LGD0pRjhARlI2BjYXqM/RaaEp +MQorPj/GTSra5qT6KkrtHjjhhThRxtNnjoD1cUsKw3jfTFSaOwT8rBjByZkCAwEA +AQKCAgAbZPdoUsllyZbC+LNkYZ19ILD5QIDNjfRb1xMGQmkXyQz1B+zOmeyrNfPc +OWEJabOfJTfj3pByN7SzG3US4333HNpQnW6mbmqqZ0HFFqPrXR/Ecuf+UUhCG5hp +m3bgM2vKbyccYsmg0VHcKfzrU7RvTTP/UNMjx2fThwvvwS+ttuSdF0HVcXJB5sfP +OWWnZNhkdHZlRf81VCED/jsZqCZYEh5eMyj9AoXvXL4zayPPf+tC0DSKaXW2Xlxg +tZQhqup8+a9nlxZia0Z9hu8clo6jXkiP8FuKgfCMV0cOjiCKLLHS5svTbLLsVWwJ +F2ZAdVcD6mWQ43qHOEK5NEzGvQKO14CaOLnVT2yAkMcyNohsEgoDP9oCBGDJQbBH +NmtZfpVjjtuTr9P9TEkU1FcBRo0x6Il/DkzamGbOeFAmgnaGElhJ5c/CAG7whaIf +mUfFOBGPH/wESY3gBOACDofeSh27RrlvbLaPiCGKivDUTBmhBsIuso6XqOKbvtfV +/HhhndpdRVfIj4DdE7gIrLIGN977JMVAXFCNz7KrvAWwcOXrCHCoWpklJ9repq8l +26ICY8K7VXktzDHQUmhd88ZWR+9ASURsJghUgZUOcMrEGyvci6Y8hpLhHiNVPHuQ ++ps7tpPsXSntBUqWBzhRZh74+nJlOOV6oYykl30JT2JzB6lwiQKCAQEA9ecn8N2z +20tR2UEiTv/MjVSepQtAAajegvcd1iasvvQKXnh3XLmoZHzH2tTa0lp5RIZpUQPl +lOTwko0lYTBnYblt65AJQ3FTgisNobIpoqE8BFXLm6wggz7CbabjmPGDe173lPGR +sI0YSKYvzrdn4zw8Fh6WULJyZHLi58zJYL3r0WBDiOoxpGaGA1GlmkuIWjhKHaX2 +OvF1vOuQDJ2eDyTc5TYFC0NKG76Mvanov5L/yrhNM/umbmp0SPspzHGZobAKUr20 +OazFT8S+2TA1OTxWNbiPbSimFoaZbEdqsNACGfVJWO8Sh8iqlt5RmEcSiSvGBj6L +QKprRO9Fsp2GawKCAQEA0zGhRsnux4JTNsdUSYsEJtITMj6eE+nl7CoZ9DAOwC5X +6/aSpUE4TT+pWNrt9iluXiGL0j89UJ7r/L1OcsiyzGb8ig9NU4zr1NIGTZ0DstHi +HPYINjeiBJEFIy17kOQn+9/I5c4hBUwz6ihwNoEomymVB/EsLJKAML0AudJGKg+Z +/f/qrS40eab5SAiaKgsh0MZnj+vIxyGBydt6r2HGmjfNITVbXIu6IpO+6NXDwM/e +7v10AAZ3j9+gb1RedLg2ghuIuYU90hmMhtVWsh9nVmaOkMW9/WFgOPYvt/mHH/hR +d4pePZ9kACGmqo/b9sHvHw1YEubtCt1VUiNuFxnJCwKCAQBWnxz0vkRTJY8phsY9 +KeK2jm5sGTBs5T2syLwb6ffENFdKvAjgAw6Mh2And/+1ReWd+/MxdLv03UjZdxsJ +x3FDfXx5FH4O4ebW3a+pnAcKoN1xcX+N0O6LDRqUYcue3sTAOs3gC9CUbr91KAWD +Phw8ccWAzTmKJ7IgLFA982ekyoI9eTmRC159WRgwJxy844qerWF+XC4GyXP+HsTZ +jNRW5Vdi7sqMEyIR7+fIEAhLI88zbATWIPmZv6pC4ybwO7wwtsCMMQNBpdjDprzL +6S12ggikV+U+QKlxGe0FtYqhykRTPJKf32eZqVheWOZJTA/9fgv9ux52oxGycM8O +gmsNAoIBAQC60m5uZnd5uYnPLWkcXYNgq/kbO1UvHHut/FhVMKX7z4MrU0XKNfWO +MECoP5K9bU0aq+Y6KIMe7FapjvT0iSHRu1Cu+HZY8JI2A0xcIAeDijLRl7sP6wrB +q1+2DKgANjRAlWfsEfoX658JBpitPngjOheBnRCMpVQMyUT5HE/BKWf5zwdUB0mY +S+K8nA90HcDeJIS8RcGolbVwUV0oBABhr/cf50lYhqozqCr7YQ33ZGs7Uq3oz8+4 +UARmN2YPLl3Znm3GX12em8c6B0LX8vvA7Jw06Rf2Ksup1+3Ce1PTLiEy9A4FyRf3 +Hc2HmBbnJAtZlr5QikMqlzzAmmLqwH6dAoIBAC+ryaQGJFsijCSuaDfRp/uy9xnd +DjgMdTwjl5WLBmyudChVMANl8eqCbvVO41CN84yORk03oQ4cx0eKxAZaLaSzgkb3 +W0X2nFQe7VJSYMQswCQ+1WfJvEFrIdkEKIa//uQdhqNrgUKSNVhhSTMbNEkDTIWn +ssbv2H9hvUaFt/J/vP9zCKuU5oYvNU7Oi6ZXRYezRn9atlJYanLFoJnHUBRzGms5 +K0vhdCPDXQq87z5Yudoh0jLUQF9Nx0GTWeBceQ9n5hZeRUNQWxP4AJThQX9KSPTS +mbL3Kh4XNRmAUJ2N+Njh+3dg91s+JkKvC1wcspLsmLPQe+9AxBSH9y5JE/8= +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/docker/php-nginx/alpine-3-php7/conf/etc/nginx/vhost.common.conf b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/vhost.common.conf new file mode 100644 index 000000000..e69de29bb diff --git a/docker/php-nginx/alpine-3-php7/conf/etc/nginx/vhost.conf b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/vhost.conf new file mode 100644 index 000000000..e21d9c0c4 --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/vhost.conf @@ -0,0 +1,84 @@ +server { + listen 80 default_server; + listen 8000 default_server; + + server_name _ docker; + + access_log /dev/stdout; + error_log /dev/stdout info; + + root ""; + index ; + + client_max_body_size 50m; + + location / { + try_files $uri $uri/ /?$query_string; + } + + location ~ \.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass php; + include fastcgi_params; + + fastcgi_param SCRIPT_FILENAME $request_filename; + + fastcgi_param MYSQL_USER ""; + fastcgi_param MYSQL_PASSWORD ""; + fastcgi_param MYSQL_ROOT_USER "root"; + fastcgi_param MYSQL_ROOT_PASSWORD ""; + fastcgi_param MYSQL_DATABASE ""; + + fastcgi_param POSTGRES_USER ""; + fastcgi_param POSTGRES_PASSWORD ""; + + fastcgi_read_timeout 1000; + } + + include /opt/docker/etc/nginx/vhost.common.conf; +} + +############## +# SSL +############## + +server { + listen 443 default_server; + listen 8443 default_server; + + server_name _ docker; + + access_log /dev/stdout; + error_log /dev/stdout info; + + root ""; + index ; + + client_max_body_size 50m; + + location / { + try_files $uri $uri/ /?$query_string; + } + + location ~ \.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass php; + include fastcgi_params; + + fastcgi_param SCRIPT_FILENAME $request_filename; + + fastcgi_param MYSQL_USER ""; + fastcgi_param MYSQL_PASSWORD ""; + fastcgi_param MYSQL_ROOT_USER "root"; + fastcgi_param MYSQL_ROOT_PASSWORD ""; + fastcgi_param MYSQL_DATABASE ""; + + fastcgi_param POSTGRES_USER ""; + fastcgi_param POSTGRES_PASSWORD ""; + + fastcgi_read_timeout 1000; + } + + include /opt/docker/etc/nginx/vhost.common.conf; + include /opt/docker/etc/nginx/vhost.ssl.conf; +} diff --git a/docker/php-nginx/alpine-3-php7/conf/etc/nginx/vhost.ssl.conf b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/vhost.ssl.conf new file mode 100644 index 000000000..4ddba251d --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/etc/nginx/vhost.ssl.conf @@ -0,0 +1,7 @@ +ssl on; +ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # not possible to do exclusive +ssl_ciphers 'EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!ECDSA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA'; +ssl_prefer_server_ciphers on; + +ssl_certificate /opt/docker/etc/nginx/ssl/server.crt; +ssl_certificate_key /opt/docker/etc/nginx/ssl/server.key; diff --git a/docker/php-nginx/alpine-3-php7/conf/etc/supervisor.d/nginx.conf b/docker/php-nginx/alpine-3-php7/conf/etc/supervisor.d/nginx.conf new file mode 100644 index 000000000..657bf499b --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/etc/supervisor.d/nginx.conf @@ -0,0 +1,14 @@ +[group:nginx] +programs=nginxd +priority=20 + +[program:nginxd] +command = /opt/docker/bin/service.d/nginx.sh +process_name=%(program_name)s +startsecs = 0 +autostart = true +autorestart = true +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 diff --git a/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-nginx/defaults/main.yml b/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-nginx/defaults/main.yml new file mode 100644 index 000000000..69cba1cb4 --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-nginx/defaults/main.yml @@ -0,0 +1,3 @@ +--- + +DOCUMENT_ROOT: "{{ lookup('env','WEB_DOCUMENT_ROOT') }}" diff --git a/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-nginx/tasks/bootstrap.yml b/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-nginx/tasks/bootstrap.yml new file mode 100644 index 000000000..ca34d3dd3 --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-nginx/tasks/bootstrap.yml @@ -0,0 +1,48 @@ +--- + +- name: Diable nginx demonize mode + lineinfile: + dest: /etc/nginx/nginx.conf + regexp: '[\s;]*{{ item.key }}[\s]*' + line: '{{ item.key }} {{ item.value }};' + with_items: + - { key: 'daemon', value: "off" } + +- name: Enable nginx main config + file: + src: '/opt/docker/etc/nginx/main.conf' + dest: '/etc/nginx/conf.d/10-docker.conf' + state: link + force: yes + +- name: Remove default vhost + file: + path: "/etc/nginx/sites-enabled/default" + state: absent + +- name: Replace default nginx.conf [RedHat/Alpine family] + file: + src: '/opt/docker/etc/nginx/nginx.conf' + dest: '/etc/nginx/nginx.conf' + state: link + force: yes + when: ansible_os_family == 'RedHat' or ansible_os_family == 'Alpine' + +- name: Ensure document root is available + file: + path: "{{ DOCUMENT_ROOT }}" + state: directory + recurse: yes + +- name: Fix rights of ssl files + file: + path: "{{ item.path }}" + state: "{{ item.state }}" + mode: "{{ item.mode }}" + owner: "root" + group: "root" + with_items: + - { path: '/opt/docker/etc/nginx/ssl', state: 'directory', mode: '0750' } + - { path: '/opt/docker/etc/nginx/ssl/server.crt', state: 'file', mode: '0640' } + - { path: '/opt/docker/etc/nginx/ssl/server.csr', state: 'file', mode: '0640' } + - { path: '/opt/docker/etc/nginx/ssl/server.key', state: 'file', mode: '0640' } diff --git a/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-nginx/tasks/main.yml b/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-nginx/tasks/main.yml new file mode 100644 index 000000000..1806c1a8c --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-nginx/tasks/main.yml @@ -0,0 +1,5 @@ +--- + +- include: bootstrap.yml + tags: + - bootstrap diff --git a/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-php-nginx/defaults/main.yml b/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-php-nginx/defaults/main.yml new file mode 100644 index 000000000..ed97d539c --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-php-nginx/defaults/main.yml @@ -0,0 +1 @@ +--- diff --git a/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-php-nginx/tasks/bootstrap.yml b/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-php-nginx/tasks/bootstrap.yml new file mode 100644 index 000000000..a2866e0d0 --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-php-nginx/tasks/bootstrap.yml @@ -0,0 +1,9 @@ +--- + +- name: Restrict php-fpm to local connection + lineinfile: + dest: '/opt/docker/etc/php/fpm/pool.d/application.conf' + regexp: '^[\s;]*{{ item.key }}[\s]*=' + line: '{{ item.key }} = {{ item.value }}' + with_items: + - { key: 'listen', value: "127.0.0.1:9000" } diff --git a/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-php-nginx/tasks/entrypoint.yml b/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-php-nginx/tasks/entrypoint.yml new file mode 100644 index 000000000..cd21505a4 --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-php-nginx/tasks/entrypoint.yml @@ -0,0 +1,2 @@ +--- + diff --git a/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-php-nginx/tasks/main.yml b/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-php-nginx/tasks/main.yml new file mode 100644 index 000000000..7895a52a9 --- /dev/null +++ b/docker/php-nginx/alpine-3-php7/conf/provision/roles/webdevops-php-nginx/tasks/main.yml @@ -0,0 +1,9 @@ +--- + +- include: bootstrap.yml + tags: + - bootstrap + +- include: entrypoint.yml + tags: + - entrypoint diff --git a/docker/php-nginx/alpine-3/Dockerfile b/docker/php-nginx/alpine-3/Dockerfile index 5097134ea..e4974a36e 100644 --- a/docker/php-nginx/alpine-3/Dockerfile +++ b/docker/php-nginx/alpine-3/Dockerfile @@ -1,12 +1,12 @@ #++++++++++++++++++++++++++++++++++++++ -# CentOS 7 PHP-Nginx Docker container +# Alpine 7 PHP-Nginx Docker container #++++++++++++++++++++++++++++++++++++++ FROM webdevops/php:alpine-3 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-nginx/centos-7/Dockerfile b/docker/php-nginx/centos-7/Dockerfile index 6f38a22e4..ba7d15d30 100644 --- a/docker/php-nginx/centos-7/Dockerfile +++ b/docker/php-nginx/centos-7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:centos-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-nginx/debian-7/Dockerfile b/docker/php-nginx/debian-7/Dockerfile index e8885c874..f2f51eb8a 100644 --- a/docker/php-nginx/debian-7/Dockerfile +++ b/docker/php-nginx/debian-7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:debian-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-nginx/debian-8-php7/Dockerfile b/docker/php-nginx/debian-8-php7/Dockerfile index 837e210ed..76b48a5a3 100644 --- a/docker/php-nginx/debian-8-php7/Dockerfile +++ b/docker/php-nginx/debian-8-php7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:debian-8-php7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-nginx/debian-8/Dockerfile b/docker/php-nginx/debian-8/Dockerfile index dd53d7714..c5d441d49 100644 --- a/docker/php-nginx/debian-8/Dockerfile +++ b/docker/php-nginx/debian-8/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:debian-8 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-nginx/debian-9-php7/Dockerfile b/docker/php-nginx/debian-9-php7/Dockerfile index 0e5d65898..4b46d6d65 100644 --- a/docker/php-nginx/debian-9-php7/Dockerfile +++ b/docker/php-nginx/debian-9-php7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:debian-9-php7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-nginx/debian-9/Dockerfile b/docker/php-nginx/debian-9/Dockerfile index 2bd302eed..10eaf2cdd 100644 --- a/docker/php-nginx/debian-9/Dockerfile +++ b/docker/php-nginx/debian-9/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:debian-9 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-nginx/ubuntu-12.04/Dockerfile b/docker/php-nginx/ubuntu-12.04/Dockerfile index b14698897..fa247d8f4 100644 --- a/docker/php-nginx/ubuntu-12.04/Dockerfile +++ b/docker/php-nginx/ubuntu-12.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:ubuntu-12.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-nginx/ubuntu-14.04/Dockerfile b/docker/php-nginx/ubuntu-14.04/Dockerfile index 797f06ad1..b495ff17a 100644 --- a/docker/php-nginx/ubuntu-14.04/Dockerfile +++ b/docker/php-nginx/ubuntu-14.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:ubuntu-14.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-nginx/ubuntu-15.04/Dockerfile b/docker/php-nginx/ubuntu-15.04/Dockerfile index 7829de6e6..baab1de1f 100644 --- a/docker/php-nginx/ubuntu-15.04/Dockerfile +++ b/docker/php-nginx/ubuntu-15.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:ubuntu-15.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-nginx/ubuntu-15.10/Dockerfile b/docker/php-nginx/ubuntu-15.10/Dockerfile index 73b21471d..05a1d9110 100644 --- a/docker/php-nginx/ubuntu-15.10/Dockerfile +++ b/docker/php-nginx/ubuntu-15.10/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:ubuntu-15.10 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-nginx/ubuntu-16.04-php7/Dockerfile b/docker/php-nginx/ubuntu-16.04-php7/Dockerfile index 74a14e3cc..4b3dcc3d3 100644 --- a/docker/php-nginx/ubuntu-16.04-php7/Dockerfile +++ b/docker/php-nginx/ubuntu-16.04-php7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:ubuntu-16.04-php7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php-nginx/ubuntu-16.04/Dockerfile b/docker/php-nginx/ubuntu-16.04/Dockerfile index 49a2b01ad..05d506a24 100644 --- a/docker/php-nginx/ubuntu-16.04/Dockerfile +++ b/docker/php-nginx/ubuntu-16.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php:ubuntu-16.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app ENV WEB_DOCUMENT_INDEX index.php diff --git a/docker/php/alpine-3-php7/Dockerfile b/docker/php/alpine-3-php7/Dockerfile new file mode 100644 index 000000000..f95903e2e --- /dev/null +++ b/docker/php/alpine-3-php7/Dockerfile @@ -0,0 +1,82 @@ +#++++++++++++++++++++++++++++++++++++++ +# CentOS 7 PHP Docker container +#++++++++++++++++++++++++++++++++++++++ + +FROM webdevops/base-app:alpine-3 +MAINTAINER info@webdevops.io +LABEL vendor=WebDevOps.io +LABEL io.webdevops.layout=6 +LABEL io.webdevops.version=0.23.0 + +# Install tools +RUN /usr/local/bin/apk-install \ + imagemagick \ + graphicsmagick + +# Install php (cli/fpm) +RUN /usr/local/bin/apk-install \ + php7-fpm \ + php7-json \ + php7-intl \ + php7-curl \ + php7-mysqli \ + php7-mysqlnd \ + php7-pdo_mysql \ + php7-pdo_sqlite \ + php7-xdebug \ + php7-memcached \ + php7-mcrypt \ + #php7-gd \ + #libwebp \ + php7-bcmath \ + php7-soap \ + php7-sqlite3 \ + php7-bz2 \ + php7-calendar \ + php7-ctype \ + php7-pcntl \ + php7-posix \ + php7-sockets \ + php7-sysvmsg \ + php7-sysvsem \ + php7-sysvshm \ + php7-xmlreader \ + php7-exif \ + php7-ftp \ + php7-gettext \ + php7-iconv \ + php7-zip \ + php7-zlib \ + php7-shmop \ + php7-wddx \ + sqlite \ + php7-xmlrpc \ + php7-xsl \ + geoip \ + php7-ldap \ + #php7-memcache \ + php7-redis \ + php7-pear \ + php7-phar \ + php7-openssl \ + php7-session \ + php7-opcache \ + php7-mbstring \ + php7-iconv \ + && ln -s /usr/bin/php7 /usr/bin/php \ + && ln -s /usr/sbin/php-fpm7 /usr/sbin/php-fpm \ + && pear channel-update pear.php.net \ + && pear upgrade-all \ + && pear config-set auto_discover 1 \ + && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer + +# Deploy scripts/configurations +COPY conf/ /opt/docker/ +RUN bash /opt/docker/bin/control.sh provision.role.bootstrap webdevops-php \ + && bash /opt/docker/bin/bootstrap.sh + + + +EXPOSE 9000 + +CMD ["supervisord"] diff --git a/docker/php/alpine-3-php7/conf/etc/logrotate.d/php5-fpm b/docker/php/alpine-3-php7/conf/etc/logrotate.d/php5-fpm new file mode 100644 index 000000000..e6ef4b123 --- /dev/null +++ b/docker/php/alpine-3-php7/conf/etc/logrotate.d/php5-fpm @@ -0,0 +1,12 @@ +/var/log/php5-fpm/fpm.log +/var/log/php5-fpm/access.log +/var/log/php5-fpm/slow.log +/var/log/php5-fpm/error.log { + missingok + notifempty + sharedscripts + delaycompress + postrotate + /bin/kill -SIGUSR1 `cat /var/run/php5-fpm.pid` 2>/dev/null || true + endscript +} diff --git a/docker/php/alpine-3-php7/conf/etc/logrotate.d/php7-fpm b/docker/php/alpine-3-php7/conf/etc/logrotate.d/php7-fpm new file mode 100644 index 000000000..668f2545f --- /dev/null +++ b/docker/php/alpine-3-php7/conf/etc/logrotate.d/php7-fpm @@ -0,0 +1,12 @@ +/var/log/php7-fpm/fpm.log +/var/log/php7-fpm/access.log +/var/log/php7-fpm/slow.log +/var/log/php7-fpm/error.log { + missingok + notifempty + sharedscripts + delaycompress + postrotate + /bin/kill -SIGUSR1 `cat /var/run/php7-fpm.pid` 2>/dev/null || true + endscript +} diff --git a/docker/php/alpine-3-php7/conf/etc/php/fpm/php-fpm.conf b/docker/php/alpine-3-php7/conf/etc/php/fpm/php-fpm.conf new file mode 100644 index 000000000..b69cd8170 --- /dev/null +++ b/docker/php/alpine-3-php7/conf/etc/php/fpm/php-fpm.conf @@ -0,0 +1,118 @@ +;;;;;;;;;;;;;;;;;;;;; +; FPM Configuration ; +;;;;;;;;;;;;;;;;;;;;; +; All relative paths in this configuration file are relative to PHP's install +; prefix (/usr). This prefix can be dynamically changed by using the +; '-p' argument from the command line. + +;;;;;;;;;;;;;;;;;; +; Global Options ; +;;;;;;;;;;;;;;;;;; + +[global] +; Pid file +; Note: the default prefix is /var +; Default Value: none +;pid = run/php-fpm.pid + +; Error log file +; If it's set to "syslog", log is sent to syslogd instead of being written +; in a local file. +; Note: the default prefix is /var +; Default Value: log/php-fpm.log +error_log = /var/log/php-fpm.log + +; syslog_facility is used to specify what type of program is logging the +; message. This lets syslogd specify that messages from different facilities +; will be handled differently. +; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON) +; Default Value: daemon +;syslog.facility = daemon + +; syslog_ident is prepended to every message. If you have multiple FPM +; instances running on the same server, you can change the default value +; which must suit common needs. +; Default Value: php-fpm +;syslog.ident = php-fpm + +; Log level +; Possible Values: alert, error, warning, notice, debug +; Default Value: notice +;log_level = notice + +; If this number of child processes exit with SIGSEGV or SIGBUS within the time +; interval set by emergency_restart_interval then FPM will restart. A value +; of '0' means 'Off'. +; Default Value: 0 +;emergency_restart_threshold = 0 + +; Interval of time used by emergency_restart_interval to determine when +; a graceful restart will be initiated. This can be useful to work around +; accidental corruptions in an accelerator's shared memory. +; Available Units: s(econds), m(inutes), h(ours), or d(ays) +; Default Unit: seconds +; Default Value: 0 +;emergency_restart_interval = 0 + +; Time limit for child processes to wait for a reaction on signals from master. +; Available units: s(econds), m(inutes), h(ours), or d(ays) +; Default Unit: seconds +; Default Value: 0 +;process_control_timeout = 0 + +; The maximum number of processes FPM will fork. This has been design to control +; the global number of processes when using dynamic PM within a lot of pools. +; Use it with caution. +; Note: A value of 0 indicates no limit +; Default Value: 0 +; process.max = 128 + +; Specify the nice(2) priority to apply to the master process (only if set) +; The value can vary from -19 (highest priority) to 20 (lower priority) +; Note: - It will only work if the FPM master process is launched as root +; - The pool process will inherit the master process priority +; unless it specified otherwise +; Default Value: no set +; process.priority = -19 + +; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging. +; Default Value: yes +;daemonize = yes + +; Set open file descriptor rlimit for the master process. +; Default Value: system defined value +;rlimit_files = 1024 + +; Set max core size rlimit for the master process. +; Possible Values: 'unlimited' or an integer greater or equal to 0 +; Default Value: system defined value +;rlimit_core = 0 + +; Specify the event mechanism FPM will use. The following is available: +; - select (any POSIX os) +; - poll (any POSIX os) +; - epoll (linux >= 2.5.44) +; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0) +; - /dev/poll (Solaris >= 7) +; - port (Solaris >= 10) +; Default Value: not set (auto detection) +;events.mechanism = epoll + +; When FPM is build with systemd integration, specify the interval, +; in second, between health report notification to systemd. +; Set to 0 to disable. +; Available Units: s(econds), m(inutes), h(ours) +; Default Unit: seconds +; Default value: 10 +;systemd_interval = 10 + + + + +; Include one or more files. If glob(3) exists, it is used to include a bunch of +; files from a glob(3) pattern. This directive can be used everywhere in the +; file. +; Relative path can also be used. They will be prefixed by: +; - the global prefix if it's been set (-p argument) +; - /usr otherwise +include=/opt/docker/etc/php/fpm/pool.d/*.conf diff --git a/docker/php/alpine-3-php7/conf/etc/php/fpm/pool.d/application.conf b/docker/php/alpine-3-php7/conf/etc/php/fpm/pool.d/application.conf new file mode 100644 index 000000000..527108c80 --- /dev/null +++ b/docker/php/alpine-3-php7/conf/etc/php/fpm/pool.d/application.conf @@ -0,0 +1,420 @@ +;;;;;;;;;;;;;;;;;;;; +; Pool Definitions ; +;;;;;;;;;;;;;;;;;;;; + +; Multiple pools of child processes may be started with different listening +; ports and different management options. The name of the pool will be +; used in logs and stats. There is no limitation on the number of pools which +; FPM can handle. Your system will tell you anyway :) + +; Start a new pool named 'www'. +; the variable $pool can we used in any directive and will be replaced by the +; pool name ('www' here) +[www] + +; Per pool prefix +; It only applies on the following directives: +; - 'access.log' +; - 'slowlog' +; - 'listen' (unixsocket) +; - 'chroot' +; - 'chdir' +; - 'php_values' +; - 'php_admin_values' +; When not set, the global prefix (or /usr) applies instead. +; Note: This directive can also be relative to the global prefix. +; Default Value: none +;prefix = /path/to/pools/$pool + +; Unix user/group of processes +; Note: The user is mandatory. If the group is not set, the default user's group +; will be used. +user = nobody +group = nobody + +; The address on which to accept FastCGI requests. +; Valid syntaxes are: +; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on +; a specific port; +; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on +; a specific port; +; 'port' - to listen on a TCP socket to all IPv4 addresses on a +; specific port; +; '[::]:port' - to listen on a TCP socket to all addresses +; (IPv6 and IPv4-mapped) on a specific port; +; '/path/to/unix/socket' - to listen on a unix socket. +; Note: This value is mandatory. +listen = 127.0.0.1:9000 + +; Set listen(2) backlog. +; Default Value: 65535 (-1 on FreeBSD and OpenBSD) +;listen.backlog = 65535 + +; Set permissions for unix socket, if one is used. In Linux, read/write +; permissions must be set in order to allow connections from a web server. Many +; BSD-derived systems allow connections regardless of permissions. +; Default Values: user and group are set as the running user +; mode is set to 0660 +;listen.owner = nobody +;listen.group = nobody +;listen.mode = 0660 +; When POSIX Access Control Lists are supported you can set them using +; these options, value is a comma separated list of user/group names. +; When set, listen.owner and listen.group are ignored +;listen.acl_users = +;listen.acl_groups = + +; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. +; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original +; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address +; must be separated by a comma. If this value is left blank, connections will be +; accepted from any ip address. +; Default Value: any +;listen.allowed_clients = 127.0.0.1 + +; Specify the nice(2) priority to apply to the pool processes (only if set) +; The value can vary from -19 (highest priority) to 20 (lower priority) +; Note: - It will only work if the FPM master process is launched as root +; - The pool processes will inherit the master process priority +; unless it specified otherwise +; Default Value: no set +; process.priority = -19 + +; Choose how the process manager will control the number of child processes. +; Possible Values: +; static - a fixed number (pm.max_children) of child processes; +; dynamic - the number of child processes are set dynamically based on the +; following directives. With this process management, there will be +; always at least 1 children. +; pm.max_children - the maximum number of children that can +; be alive at the same time. +; pm.start_servers - the number of children created on startup. +; pm.min_spare_servers - the minimum number of children in 'idle' +; state (waiting to process). If the number +; of 'idle' processes is less than this +; number then some children will be created. +; pm.max_spare_servers - the maximum number of children in 'idle' +; state (waiting to process). If the number +; of 'idle' processes is greater than this +; number then some children will be killed. +; ondemand - no children are created at startup. Children will be forked when +; new requests will connect. The following parameter are used: +; pm.max_children - the maximum number of children that +; can be alive at the same time. +; pm.process_idle_timeout - The number of seconds after which +; an idle process will be killed. +; Note: This value is mandatory. +pm = dynamic + +; The number of child processes to be created when pm is set to 'static' and the +; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. +; This value sets the limit on the number of simultaneous requests that will be +; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. +; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP +; CGI. The below defaults are based on a server without much resources. Don't +; forget to tweak pm.* to fit your needs. +; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' +; Note: This value is mandatory. +pm.max_children = 5 + +; The number of child processes created on startup. +; Note: Used only when pm is set to 'dynamic' +; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 +pm.start_servers = 2 + +; The desired minimum number of idle server processes. +; Note: Used only when pm is set to 'dynamic' +; Note: Mandatory when pm is set to 'dynamic' +pm.min_spare_servers = 1 + +; The desired maximum number of idle server processes. +; Note: Used only when pm is set to 'dynamic' +; Note: Mandatory when pm is set to 'dynamic' +pm.max_spare_servers = 3 + +; The number of seconds after which an idle process will be killed. +; Note: Used only when pm is set to 'ondemand' +; Default Value: 10s +;pm.process_idle_timeout = 10s; + +; The number of requests each child process should execute before respawning. +; This can be useful to work around memory leaks in 3rd party libraries. For +; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default Value: 0 +;pm.max_requests = 500 + +; The URI to view the FPM status page. If this value is not set, no URI will be +; recognized as a status page. It shows the following informations: +; pool - the name of the pool; +; process manager - static, dynamic or ondemand; +; start time - the date and time FPM has started; +; start since - number of seconds since FPM has started; +; accepted conn - the number of request accepted by the pool; +; listen queue - the number of request in the queue of pending +; connections (see backlog in listen(2)); +; max listen queue - the maximum number of requests in the queue +; of pending connections since FPM has started; +; listen queue len - the size of the socket queue of pending connections; +; idle processes - the number of idle processes; +; active processes - the number of active processes; +; total processes - the number of idle + active processes; +; max active processes - the maximum number of active processes since FPM +; has started; +; max children reached - number of times, the process limit has been reached, +; when pm tries to start more children (works only for +; pm 'dynamic' and 'ondemand'); +; Value are updated in real time. +; Example output: +; pool: www +; process manager: static +; start time: 01/Jul/2011:17:53:49 +0200 +; start since: 62636 +; accepted conn: 190460 +; listen queue: 0 +; max listen queue: 1 +; listen queue len: 42 +; idle processes: 4 +; active processes: 11 +; total processes: 15 +; max active processes: 12 +; max children reached: 0 +; +; By default the status page output is formatted as text/plain. Passing either +; 'html', 'xml' or 'json' in the query string will return the corresponding +; output syntax. Example: +; http://www.foo.bar/status +; http://www.foo.bar/status?json +; http://www.foo.bar/status?html +; http://www.foo.bar/status?xml +; +; By default the status page only outputs short status. Passing 'full' in the +; query string will also return status for each pool process. +; Example: +; http://www.foo.bar/status?full +; http://www.foo.bar/status?json&full +; http://www.foo.bar/status?html&full +; http://www.foo.bar/status?xml&full +; The Full status returns for each process: +; pid - the PID of the process; +; state - the state of the process (Idle, Running, ...); +; start time - the date and time the process has started; +; start since - the number of seconds since the process has started; +; requests - the number of requests the process has served; +; request duration - the duration in µs of the requests; +; request method - the request method (GET, POST, ...); +; request URI - the request URI with the query string; +; content length - the content length of the request (only with POST); +; user - the user (PHP_AUTH_USER) (or '-' if not set); +; script - the main script called (or '-' if not set); +; last request cpu - the %cpu the last request consumed +; it's always 0 if the process is not in Idle state +; because CPU calculation is done when the request +; processing has terminated; +; last request memory - the max amount of memory the last request consumed +; it's always 0 if the process is not in Idle state +; because memory calculation is done when the request +; processing has terminated; +; If the process is in Idle state, then informations are related to the +; last request the process has served. Otherwise informations are related to +; the current request being served. +; Example output: +; ************************ +; pid: 31330 +; state: Running +; start time: 01/Jul/2011:17:53:49 +0200 +; start since: 63087 +; requests: 12808 +; request duration: 1250261 +; request method: GET +; request URI: /test_mem.php?N=10000 +; content length: 0 +; user: - +; script: /home/fat/web/docs/php/test_mem.php +; last request cpu: 0.00 +; last request memory: 0 +; +; Note: There is a real-time FPM status monitoring sample web page available +; It's available in: /usr/share/php/fpm/status.html +; +; Note: The value must start with a leading slash (/). The value can be +; anything, but it may not be a good idea to use the .php extension or it +; may conflict with a real PHP file. +; Default Value: not set +;pm.status_path = /status + +; The ping URI to call the monitoring page of FPM. If this value is not set, no +; URI will be recognized as a ping page. This could be used to test from outside +; that FPM is alive and responding, or to +; - create a graph of FPM availability (rrd or such); +; - remove a server from a group if it is not responding (load balancing); +; - trigger alerts for the operating team (24/7). +; Note: The value must start with a leading slash (/). The value can be +; anything, but it may not be a good idea to use the .php extension or it +; may conflict with a real PHP file. +; Default Value: not set +;ping.path = /ping + +; This directive may be used to customize the response of a ping request. The +; response is formatted as text/plain with a 200 response code. +; Default Value: pong +;ping.response = pong + +; The access log file +; Default: not set +;access.log = log/$pool.access.log + +; The access log format. +; The following syntax is allowed +; %%: the '%' character +; %C: %CPU used by the request +; it can accept the following format: +; - %{user}C for user CPU only +; - %{system}C for system CPU only +; - %{total}C for user + system CPU (default) +; %d: time taken to serve the request +; it can accept the following format: +; - %{seconds}d (default) +; - %{miliseconds}d +; - %{mili}d +; - %{microseconds}d +; - %{micro}d +; %e: an environment variable (same as $_ENV or $_SERVER) +; it must be associated with embraces to specify the name of the env +; variable. Some exemples: +; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e +; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e +; %f: script filename +; %l: content-length of the request (for POST request only) +; %m: request method +; %M: peak of memory allocated by PHP +; it can accept the following format: +; - %{bytes}M (default) +; - %{kilobytes}M +; - %{kilo}M +; - %{megabytes}M +; - %{mega}M +; %n: pool name +; %o: output header +; it must be associated with embraces to specify the name of the header: +; - %{Content-Type}o +; - %{X-Powered-By}o +; - %{Transfert-Encoding}o +; - .... +; %p: PID of the child that serviced the request +; %P: PID of the parent of the child that serviced the request +; %q: the query string +; %Q: the '?' character if query string exists +; %r: the request URI (without the query string, see %q and %Q) +; %R: remote IP address +; %s: status (response code) +; %t: server time the request was received +; it can accept a strftime(3) format: +; %d/%b/%Y:%H:%M:%S %z (default) +; %T: time the log has been written (the request has finished) +; it can accept a strftime(3) format: +; %d/%b/%Y:%H:%M:%S %z (default) +; %u: remote user +; +; Default: "%R - %u %t \"%m %r\" %s" +;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" + +; The log file for slow requests +; Default Value: not set +; Note: slowlog is mandatory if request_slowlog_timeout is set +;slowlog = log/$pool.log.slow + +; The timeout for serving a single request after which a PHP backtrace will be +; dumped to the 'slowlog' file. A value of '0s' means 'off'. +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) +; Default Value: 0 +;request_slowlog_timeout = 0 + +; The timeout for serving a single request after which the worker process will +; be killed. This option should be used when the 'max_execution_time' ini option +; does not stop script execution for some reason. A value of '0' means 'off'. +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) +; Default Value: 0 +;request_terminate_timeout = 0 + +; Set open file descriptor rlimit. +; Default Value: system defined value +;rlimit_files = 1024 + +; Set max core size rlimit. +; Possible Values: 'unlimited' or an integer greater or equal to 0 +; Default Value: system defined value +;rlimit_core = 0 + +; Chroot to this directory at the start. This value must be defined as an +; absolute path. When this value is not set, chroot is not used. +; Note: you can prefix with '$prefix' to chroot to the pool prefix or one +; of its subdirectories. If the pool prefix is not set, the global prefix +; will be used instead. +; Note: chrooting is a great security feature and should be used whenever +; possible. However, all PHP paths will be relative to the chroot +; (error_log, sessions.save_path, ...). +; Default Value: not set +;chroot = + +; Chdir to this directory at the start. +; Note: relative path can be used. +; Default Value: current directory or / when chroot +;chdir = /var/www + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; Default Value: no +;catch_workers_output = yes + +; Clear environment in FPM workers +; Prevents arbitrary environment variables from reaching FPM worker processes +; by clearing the environment in workers before env vars specified in this +; pool configuration are added. +; Setting to "no" will make all environment variables available to PHP code +; via getenv(), $_ENV and $_SERVER. +; Default Value: yes +;clear_env = no + +; Limits the extensions of the main script FPM will allow to parse. This can +; prevent configuration mistakes on the web server side. You should only limit +; FPM to .php extensions to prevent malicious users to use other extensions to +; exectute php code. +; Note: set an empty value to allow all extensions. +; Default Value: .php +;security.limit_extensions = .php .php3 .php4 .php5 + +; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from +; the current environment. +; Default Value: clean env +;env[HOSTNAME] = $HOSTNAME +;env[PATH] = /usr/local/bin:/usr/bin:/bin +;env[TMP] = /tmp +;env[TMPDIR] = /tmp +;env[TEMP] = /tmp + +; Additional php.ini defines, specific to this pool of workers. These settings +; overwrite the values previously defined in the php.ini. The directives are the +; same as the PHP SAPI: +; php_value/php_flag - you can set classic ini defines which can +; be overwritten from PHP call 'ini_set'. +; php_admin_value/php_admin_flag - these directives won't be overwritten by +; PHP call 'ini_set' +; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. + +; Defining 'extension' will load the corresponding shared extension from +; extension_dir. Defining 'disable_functions' or 'disable_classes' will not +; overwrite previously defined php.ini values, but will append the new value +; instead. + +; Note: path INI options can be relative and will be expanded with the prefix +; (pool, global or /usr) + +; Default Value: nothing is defined by default except the values in php.ini and +; specified at startup with the -d argument +;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com +;php_flag[display_errors] = off +;php_admin_value[error_log] = /var/log/fpm-php.www.log +;php_admin_flag[log_errors] = on +;php_admin_value[memory_limit] = 32M diff --git a/docker/php/alpine-3-php7/conf/etc/php/php.ini b/docker/php/alpine-3-php7/conf/etc/php/php.ini new file mode 100644 index 000000000..44168d270 --- /dev/null +++ b/docker/php/alpine-3-php7/conf/etc/php/php.ini @@ -0,0 +1,28 @@ +; ------------------------------------- +; Docker PHP configuration +; ------------------------------------- + +; this file will overwrite default php.ini settings + +display_errors = 0 + +short_open_tag = Off +variables_order = 'GPCS' +request_order = 'GP' + +allow_url_fopen = On +allow_url_include = Off + +memory_limit = 512M +max_execution_time = 300 +max_input_time = 300 +post_max_size = 50M +upload_max_filesize = 50M +max_input_vars = 5000 + +expose_php = Off + +date.timezone = UTC + +mysql.default_host = mysql +mysqli.default_host = mysql diff --git a/provisioning/php/alpine/etc/supervisor.d/php-fpm.conf b/docker/php/alpine-3-php7/conf/etc/supervisor.d/php-fpm.conf similarity index 97% rename from provisioning/php/alpine/etc/supervisor.d/php-fpm.conf rename to docker/php/alpine-3-php7/conf/etc/supervisor.d/php-fpm.conf index 696ff6d16..33e894d11 100644 --- a/provisioning/php/alpine/etc/supervisor.d/php-fpm.conf +++ b/docker/php/alpine-3-php7/conf/etc/supervisor.d/php-fpm.conf @@ -3,7 +3,7 @@ programs=php-fpmd,php-fpm-log-fpm,php-fpm-log-slow,php-fpm-log-error,php-fpm-log priority=20 [program:php-fpmd] -command = /usr/bin/php-fpm --nodaemonize +command = /usr/sbin/php-fpm --nodaemonize process_name=%(program_name)s startsecs = 0 autostart = true diff --git a/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/defaults/main.yml b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/defaults/main.yml new file mode 100644 index 000000000..81f5b7efd --- /dev/null +++ b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/defaults/main.yml @@ -0,0 +1,6 @@ +--- + +APPLICATION_USER: "{{ lookup('env','APPLICATION_USER') }}" +APPLICATION_GROUP: "{{ lookup('env','APPLICATION_GROUP') }}" +APPLICATION_UID: "{{ lookup('env','APPLICATION_UID') }}" +APPLICATION_GID: "{{ lookup('env','APPLICATION_GID') }}" diff --git a/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap.yml b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap.yml new file mode 100644 index 000000000..3c2032cb5 --- /dev/null +++ b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap.yml @@ -0,0 +1,7 @@ +--- + +- include: bootstrap/php.yml +- include: bootstrap/php-fpm.main.yml +- include: bootstrap/php-fpm.pool.yml +- include: bootstrap/php-fpm.yml +- include: bootstrap/php-module.xdebug.yml diff --git a/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml new file mode 100644 index 000000000..82c7effa6 --- /dev/null +++ b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml @@ -0,0 +1,53 @@ +--- + +- name: Set php main file + set_fact: + php_main_conf: /etc/php-fpm.conf + when: ansible_os_family == 'RedHat' + +- name: Set php main file + set_fact: + php_main_conf: /etc/php/7.0/fpm/php-fpm.conf + when: ansible_os_family == 'Debian' + +- name: Set php main file + set_fact: + php_main_conf: /etc/php7/php-fpm.conf + when: ansible_os_family == 'Alpine' + +- name: Create php directories + file: + path: "{{ item }}" + state: directory + mode: 0755 + owner: "root" + group: "root" + with_items: + - /opt/docker/etc/php/fpm/ + +- name: Move php-fpm main file to /opt/docker/etc/php/fpm/ + command: "mv {{ php_main_conf }} /opt/docker/etc/php/fpm/php-fpm.conf" + args: + creates: /opt/docker/etc/php/fpm/php-fpm.conf + +- name: Remove php-fpm main file + file: + path: "{{ php_main_conf }}" + state: absent + +- name: Symlink php-fpm main file + file: + path: "{{ php_main_conf }}" + src: "/opt/docker/etc/php/fpm/php-fpm.conf" + state: link + owner: "root" + group: "root" + +- name: Configure php-fpm main + lineinfile: + dest: '/opt/docker/etc/php/fpm/php-fpm.conf' + regexp: '^[\s;]*{{ item.key }}[\s]*=' + line: '{{ item.key }} = {{ item.value }}' + with_items: + - { key: 'error_log', value: "/var/log/php7-fpm/fpm.log" } + - { key: 'pid', value: "/var/run/php7-fpm.pid" } diff --git a/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml new file mode 100644 index 000000000..126c4b4a3 --- /dev/null +++ b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml @@ -0,0 +1,77 @@ +--- + +- name: Set php pool file + set_fact: + php_pool_conf: www.conf + php_pool_dir: /etc/php-fpm.d + when: ansible_os_family == 'RedHat' + +- name: Set php pool file + set_fact: + php_pool_conf: www.conf + php_pool_dir: /etc/php/7.0/fpm/pool.d + when: ansible_os_family == 'Debian' + +- name: Set php pool file + set_fact: + php_pool_conf: www.conf + php_pool_dir: /etc/php7/php-fpm.d + when: ansible_os_family == 'Alpine' + +- name: Create php directories + file: + path: "{{ item }}" + state: directory + mode: 0755 + owner: "root" + group: "root" + with_items: + - /opt/docker/etc/php/fpm/ + +- name: Move php-fpm pool directory file to /opt/docker/etc/php/ + command: "mv {{ php_pool_dir }} /opt/docker/etc/php/fpm/pool.d" + args: + creates: /opt/docker/etc/php/fpm/pool.d + +- name: Rename pool file file to application.conf" + command: "mv /opt/docker/etc/php/fpm/pool.d/{{ php_pool_conf }} /opt/docker/etc/php/fpm/pool.d/application.conf" + args: + creates: /opt/docker/etc/php/fpm/pool.d/application.conf + +- name: Remove php-fpm pool directory + file: + path: "{{ php_pool_dir }}" + state: absent + +- name: Symlink php-fpm main file + file: + path: "{{ php_pool_dir }}" + src: "/opt/docker/etc/php/fpm/pool.d" + state: link + owner: "root" + group: "root" + + +- name: Configure php-fpm pool user (www.conf) + lineinfile: + dest: '/opt/docker/etc/php/fpm/pool.d/application.conf' + regexp: '^[\s;]*{{ item.key }}[\s]*=' + line: '{{ item.key }} = {{ item.value }}' + with_items: + - { key: 'listen', value: "0.0.0.0:9000" } + - { key: 'catch_workers_output', value: "yes" } + - { key: 'access.log', value: "/var/log/php7-fpm/access.log" } + - { key: 'slowlog', value: "/var/log/php7-fpm/slow.log" } + - { key: 'php_admin_value[error_log]', value: "/var/log/php7-fpm/error.log" } + - { key: 'php_admin_value[log_errors]', value: "on" } + - { key: 'user', value: "{{ APPLICATION_USER }}" } + - { key: 'group', value: "{{ APPLICATION_GROUP }}" } + +- name: Disable php-fpm connection limit + lineinfile: + dest: '/opt/docker/etc/php/fpm/pool.d/application.conf' + regexp: '^[\s;]*{{ item.key }}[\s]*=' + line: ';{{ item.key }}' + with_items: + - { key: 'listen.allowed_clients' } + diff --git a/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml new file mode 100644 index 000000000..130542f53 --- /dev/null +++ b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -0,0 +1,54 @@ +--- + +- name: Symlink php-fpm binary [RedHat family] + file: + path: "/usr/sbin/php-fpm7.0" + src: "/usr/sbin/php-fpm" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'RedHat' + +- name: Symlink php-fpm binary [Alpine family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php-fpm7" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php-fpm7.0" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' + +- name: Remove default php-fpm logrotate + file: + path: "/etc/logrotate.d/php-fpm" + state: absent + when: ansible_os_family == 'RedHat' + +- name: Create php-fpm log directory + file: + path: "/var/log/php7-fpm/" + state: directory + owner: "root" + group: "root" + +- name: Create php-fpm log files + file: + path: "/var/log/php7-fpm/{{ item }}" + state: touch + owner: "root" + group: "root" + mode: 0600 + with_items: + - slow.log + - access.log + - error.log + - fpm.log diff --git a/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml new file mode 100644 index 000000000..e195ee9e6 --- /dev/null +++ b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml @@ -0,0 +1,17 @@ +--- + +- name: Set php xdebug file [Alpine family] + set_fact: + php_xdebug_conf: /etc/php7/conf.d/xdebug.ini + when: ansible_distribution == 'Alpine' + +- name: Disable xdebug + replace: + dest: '{{ php_xdebug_conf }}' + regexp: '^[\s]*({{ item }}[\s]*=.*)$' + replace: ';\1' + with_items: + - 'zend_extension' + - 'extension' + ignore_errors: yes + when: php_xdebug_conf is defined diff --git a/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php.yml b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php.yml new file mode 100644 index 000000000..84795d592 --- /dev/null +++ b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php.yml @@ -0,0 +1,42 @@ +--- + +- name: Create php directories + file: + path: "{{ item }}" + state: directory + mode: 0755 + owner: "root" + group: "root" + with_items: + - /opt/docker/etc/php/ + - /opt/docker/etc/php/fpm/ + +- name: Create /opt/docker/etc/php/php.ini" + file: + path: "/opt/docker/etc/php/php.ini" + state: touch + mode: 0744 + owner: root + group: root + +- name: Link php.ini for cli and fpm + file: + src: '{{ item.file }}' + dest: '/etc/php/7.0/{{ item.category }}/conf.d/{{ item.target }}' + force: yes + state: link + with_items: + # PHP cli + - { category: 'cli', file: '/opt/docker/etc/php/php.ini', target: '99-docker.ini' } + # PHP fpm + - { category: 'fpm', file: '/opt/docker/etc/php/php.ini', target: '99-docker.ini' } + + when: ansible_os_family == 'Debian' + +- name: Link php.ini + file: + src: '/opt/docker/etc/php/php.ini' + dest: '/etc/php7/conf.d/99-docker.ini' + force: yes + state: link + when: ansible_os_family == 'Alpine' diff --git a/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/main.yml b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/main.yml new file mode 100644 index 000000000..1806c1a8c --- /dev/null +++ b/docker/php/alpine-3-php7/conf/provision/roles/webdevops-php/tasks/main.yml @@ -0,0 +1,5 @@ +--- + +- include: bootstrap.yml + tags: + - bootstrap diff --git a/docker/php/alpine-3/Dockerfile b/docker/php/alpine-3/Dockerfile index 9a15d3a5d..2aa7e71df 100644 --- a/docker/php/alpine-3/Dockerfile +++ b/docker/php/alpine-3/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:alpine-3 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Install tools RUN /usr/local/bin/apk-install \ diff --git a/docker/php/alpine-3/conf/etc/php/fpm/php-fpm.conf b/docker/php/alpine-3/conf/etc/php/fpm/php-fpm.conf index 596980343..b69cd8170 100644 --- a/docker/php/alpine-3/conf/etc/php/fpm/php-fpm.conf +++ b/docker/php/alpine-3/conf/etc/php/fpm/php-fpm.conf @@ -115,4 +115,4 @@ error_log = /var/log/php-fpm.log ; Relative path can also be used. They will be prefixed by: ; - the global prefix if it's been set (-p argument) ; - /usr otherwise -include=/etc/php/fpm.d/*.conf +include=/opt/docker/etc/php/fpm/pool.d/*.conf diff --git a/docker/php/alpine-3/conf/etc/supervisor.d/php-fpm.conf b/docker/php/alpine-3/conf/etc/supervisor.d/php-fpm.conf index 696ff6d16..33e894d11 100644 --- a/docker/php/alpine-3/conf/etc/supervisor.d/php-fpm.conf +++ b/docker/php/alpine-3/conf/etc/supervisor.d/php-fpm.conf @@ -3,7 +3,7 @@ programs=php-fpmd,php-fpm-log-fpm,php-fpm-log-slow,php-fpm-log-error,php-fpm-log priority=20 [program:php-fpmd] -command = /usr/bin/php-fpm --nodaemonize +command = /usr/sbin/php-fpm --nodaemonize process_name=%(program_name)s startsecs = 0 autostart = true diff --git a/docker/php/alpine-3/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/docker/php/alpine-3/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml index cac44982b..d83edb3ae 100644 --- a/docker/php/alpine-3/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml +++ b/docker/php/alpine-3/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -1,13 +1,22 @@ --- -- name: Symlink php-fpm binary +- name: Symlink php-fpm binary [Alpine family] file: - path: "/usr/sbin/php5-fpm" - src: "/sbin/php-fpm" + path: "/usr/sbin/php-fpm" + src: "/usr/bin/php-fpm" state: link owner: "root" group: "root" - when: ansible_os_family == 'RedHat' + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php5-fpm" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' - name: Remove default php-fpm logrotate file: diff --git a/docker/php/centos-7/Dockerfile b/docker/php/centos-7/Dockerfile index 2c86b96f3..4b3c833e7 100644 --- a/docker/php/centos-7/Dockerfile +++ b/docker/php/centos-7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:centos-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Install tools RUN /usr/local/bin/yum-install \ diff --git a/docker/php/centos-7/conf/etc/supervisor.d/php-fpm.conf b/docker/php/centos-7/conf/etc/supervisor.d/php-fpm.conf index 228843358..33e894d11 100644 --- a/docker/php/centos-7/conf/etc/supervisor.d/php-fpm.conf +++ b/docker/php/centos-7/conf/etc/supervisor.d/php-fpm.conf @@ -3,7 +3,7 @@ programs=php-fpmd,php-fpm-log-fpm,php-fpm-log-slow,php-fpm-log-error,php-fpm-log priority=20 [program:php-fpmd] -command = /usr/sbin/php5-fpm --nodaemonize +command = /usr/sbin/php-fpm --nodaemonize process_name=%(program_name)s startsecs = 0 autostart = true diff --git a/docker/php/centos-7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/docker/php/centos-7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml index cac44982b..d83edb3ae 100644 --- a/docker/php/centos-7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml +++ b/docker/php/centos-7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -1,13 +1,22 @@ --- -- name: Symlink php-fpm binary +- name: Symlink php-fpm binary [Alpine family] file: - path: "/usr/sbin/php5-fpm" - src: "/sbin/php-fpm" + path: "/usr/sbin/php-fpm" + src: "/usr/bin/php-fpm" state: link owner: "root" group: "root" - when: ansible_os_family == 'RedHat' + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php5-fpm" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' - name: Remove default php-fpm logrotate file: diff --git a/docker/php/debian-7/Dockerfile b/docker/php/debian-7/Dockerfile index cc9a3b345..32960bb09 100644 --- a/docker/php/debian-7/Dockerfile +++ b/docker/php/debian-7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:debian-7 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Install tools RUN /usr/local/bin/apt-install \ diff --git a/docker/php/debian-7/conf/etc/supervisor.d/php-fpm.conf b/docker/php/debian-7/conf/etc/supervisor.d/php-fpm.conf index 228843358..33e894d11 100644 --- a/docker/php/debian-7/conf/etc/supervisor.d/php-fpm.conf +++ b/docker/php/debian-7/conf/etc/supervisor.d/php-fpm.conf @@ -3,7 +3,7 @@ programs=php-fpmd,php-fpm-log-fpm,php-fpm-log-slow,php-fpm-log-error,php-fpm-log priority=20 [program:php-fpmd] -command = /usr/sbin/php5-fpm --nodaemonize +command = /usr/sbin/php-fpm --nodaemonize process_name=%(program_name)s startsecs = 0 autostart = true diff --git a/docker/php/debian-7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/docker/php/debian-7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml index cac44982b..d83edb3ae 100644 --- a/docker/php/debian-7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml +++ b/docker/php/debian-7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -1,13 +1,22 @@ --- -- name: Symlink php-fpm binary +- name: Symlink php-fpm binary [Alpine family] file: - path: "/usr/sbin/php5-fpm" - src: "/sbin/php-fpm" + path: "/usr/sbin/php-fpm" + src: "/usr/bin/php-fpm" state: link owner: "root" group: "root" - when: ansible_os_family == 'RedHat' + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php5-fpm" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' - name: Remove default php-fpm logrotate file: diff --git a/docker/php/debian-8-php7/Dockerfile b/docker/php/debian-8-php7/Dockerfile index bf8850c62..33921f37e 100644 --- a/docker/php/debian-8-php7/Dockerfile +++ b/docker/php/debian-8-php7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:debian-8 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Install dotdeb RUN echo "deb http://packages.dotdeb.org jessie all" >> /etc/apt/sources.list \ diff --git a/docker/php/debian-8-php7/conf/etc/logrotate.d/php5-fpm b/docker/php/debian-8-php7/conf/etc/logrotate.d/php5-fpm new file mode 100644 index 000000000..e6ef4b123 --- /dev/null +++ b/docker/php/debian-8-php7/conf/etc/logrotate.d/php5-fpm @@ -0,0 +1,12 @@ +/var/log/php5-fpm/fpm.log +/var/log/php5-fpm/access.log +/var/log/php5-fpm/slow.log +/var/log/php5-fpm/error.log { + missingok + notifempty + sharedscripts + delaycompress + postrotate + /bin/kill -SIGUSR1 `cat /var/run/php5-fpm.pid` 2>/dev/null || true + endscript +} diff --git a/docker/php/debian-8-php7/conf/etc/supervisor.d/php-fpm.conf b/docker/php/debian-8-php7/conf/etc/supervisor.d/php-fpm.conf index 21f6579e1..33e894d11 100644 --- a/docker/php/debian-8-php7/conf/etc/supervisor.d/php-fpm.conf +++ b/docker/php/debian-8-php7/conf/etc/supervisor.d/php-fpm.conf @@ -3,7 +3,7 @@ programs=php-fpmd,php-fpm-log-fpm,php-fpm-log-slow,php-fpm-log-error,php-fpm-log priority=20 [program:php-fpmd] -command = /usr/sbin/php-fpm7.0 --nodaemonize +command = /usr/sbin/php-fpm --nodaemonize process_name=%(program_name)s startsecs = 0 autostart = true @@ -14,7 +14,7 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:php-fpm-log-fpm] -command = bash /opt/docker/bin/logwatch.sh php:fpm /var/log/php7-fpm/fpm.log +command = bash /opt/docker/bin/logwatch.sh php:fpm /var/log/php5-fpm/fpm.log startsecs = 0 autostart = true autorestart = true @@ -24,7 +24,7 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:php-fpm-log-slow] -command = bash /opt/docker/bin/logwatch.sh php:slow /var/log/php7-fpm/slow.log +command = bash /opt/docker/bin/logwatch.sh php:slow /var/log/php5-fpm/slow.log startsecs = 0 autostart = true autorestart = true @@ -34,7 +34,7 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:php-fpm-log-error] -command = bash /opt/docker/bin/logwatch.sh php:error /var/log/php7-fpm/error.log +command = bash /opt/docker/bin/logwatch.sh php:error /var/log/php5-fpm/error.log startsecs = 0 autostart = true autorestart = true @@ -44,7 +44,7 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:php-fpm-log-access] -command = bash /opt/docker/bin/logwatch.sh php:access /var/log/php7-fpm/access.log +command = bash /opt/docker/bin/logwatch.sh php:access /var/log/php5-fpm/access.log startsecs = 0 autostart = true autorestart = true diff --git a/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml b/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml index d26b22778..82c7effa6 100644 --- a/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml +++ b/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml @@ -10,6 +10,11 @@ php_main_conf: /etc/php/7.0/fpm/php-fpm.conf when: ansible_os_family == 'Debian' +- name: Set php main file + set_fact: + php_main_conf: /etc/php7/php-fpm.conf + when: ansible_os_family == 'Alpine' + - name: Create php directories file: path: "{{ item }}" @@ -22,6 +27,13 @@ - name: Move php-fpm main file to /opt/docker/etc/php/fpm/ command: "mv {{ php_main_conf }} /opt/docker/etc/php/fpm/php-fpm.conf" + args: + creates: /opt/docker/etc/php/fpm/php-fpm.conf + +- name: Remove php-fpm main file + file: + path: "{{ php_main_conf }}" + state: absent - name: Symlink php-fpm main file file: diff --git a/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml b/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml index 3f3865fae..126c4b4a3 100644 --- a/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml +++ b/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml @@ -12,6 +12,12 @@ php_pool_dir: /etc/php/7.0/fpm/pool.d when: ansible_os_family == 'Debian' +- name: Set php pool file + set_fact: + php_pool_conf: www.conf + php_pool_dir: /etc/php7/php-fpm.d + when: ansible_os_family == 'Alpine' + - name: Create php directories file: path: "{{ item }}" @@ -24,9 +30,18 @@ - name: Move php-fpm pool directory file to /opt/docker/etc/php/ command: "mv {{ php_pool_dir }} /opt/docker/etc/php/fpm/pool.d" + args: + creates: /opt/docker/etc/php/fpm/pool.d - name: Rename pool file file to application.conf" command: "mv /opt/docker/etc/php/fpm/pool.d/{{ php_pool_conf }} /opt/docker/etc/php/fpm/pool.d/application.conf" + args: + creates: /opt/docker/etc/php/fpm/pool.d/application.conf + +- name: Remove php-fpm pool directory + file: + path: "{{ php_pool_dir }}" + state: absent - name: Symlink php-fpm main file file: diff --git a/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml index 89e71f8b5..130542f53 100644 --- a/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml +++ b/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -1,14 +1,32 @@ --- -- name: Symlink php-fpm binary +- name: Symlink php-fpm binary [RedHat family] file: path: "/usr/sbin/php-fpm7.0" - src: "/sbin/php-fpm" + src: "/usr/sbin/php-fpm" state: link owner: "root" group: "root" when: ansible_os_family == 'RedHat' +- name: Symlink php-fpm binary [Alpine family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php-fpm7" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php-fpm7.0" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' + - name: Remove default php-fpm logrotate file: path: "/etc/logrotate.d/php-fpm" diff --git a/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml b/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml index 6f784be1b..e195ee9e6 100644 --- a/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml +++ b/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml @@ -1,3 +1,17 @@ --- -# Currently not available +- name: Set php xdebug file [Alpine family] + set_fact: + php_xdebug_conf: /etc/php7/conf.d/xdebug.ini + when: ansible_distribution == 'Alpine' + +- name: Disable xdebug + replace: + dest: '{{ php_xdebug_conf }}' + regexp: '^[\s]*({{ item }}[\s]*=.*)$' + replace: ';\1' + with_items: + - 'zend_extension' + - 'extension' + ignore_errors: yes + when: php_xdebug_conf is defined diff --git a/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php.yml b/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php.yml index b7f7ea20e..84795d592 100644 --- a/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php.yml +++ b/docker/php/debian-8-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php.yml @@ -30,4 +30,13 @@ - { category: 'cli', file: '/opt/docker/etc/php/php.ini', target: '99-docker.ini' } # PHP fpm - { category: 'fpm', file: '/opt/docker/etc/php/php.ini', target: '99-docker.ini' } + when: ansible_os_family == 'Debian' + +- name: Link php.ini + file: + src: '/opt/docker/etc/php/php.ini' + dest: '/etc/php7/conf.d/99-docker.ini' + force: yes + state: link + when: ansible_os_family == 'Alpine' diff --git a/docker/php/debian-8/Dockerfile b/docker/php/debian-8/Dockerfile index 7f6b88732..bcf655b73 100644 --- a/docker/php/debian-8/Dockerfile +++ b/docker/php/debian-8/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:debian-8 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Install tools RUN /usr/local/bin/apt-install \ diff --git a/docker/php/debian-8/conf/etc/supervisor.d/php-fpm.conf b/docker/php/debian-8/conf/etc/supervisor.d/php-fpm.conf index 228843358..33e894d11 100644 --- a/docker/php/debian-8/conf/etc/supervisor.d/php-fpm.conf +++ b/docker/php/debian-8/conf/etc/supervisor.d/php-fpm.conf @@ -3,7 +3,7 @@ programs=php-fpmd,php-fpm-log-fpm,php-fpm-log-slow,php-fpm-log-error,php-fpm-log priority=20 [program:php-fpmd] -command = /usr/sbin/php5-fpm --nodaemonize +command = /usr/sbin/php-fpm --nodaemonize process_name=%(program_name)s startsecs = 0 autostart = true diff --git a/docker/php/debian-8/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/docker/php/debian-8/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml index cac44982b..d83edb3ae 100644 --- a/docker/php/debian-8/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml +++ b/docker/php/debian-8/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -1,13 +1,22 @@ --- -- name: Symlink php-fpm binary +- name: Symlink php-fpm binary [Alpine family] file: - path: "/usr/sbin/php5-fpm" - src: "/sbin/php-fpm" + path: "/usr/sbin/php-fpm" + src: "/usr/bin/php-fpm" state: link owner: "root" group: "root" - when: ansible_os_family == 'RedHat' + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php5-fpm" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' - name: Remove default php-fpm logrotate file: diff --git a/docker/php/debian-9-php7/Dockerfile b/docker/php/debian-9-php7/Dockerfile index 8326b503a..ebe08feae 100644 --- a/docker/php/debian-9-php7/Dockerfile +++ b/docker/php/debian-9-php7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:debian-9 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Install tools RUN /usr/local/bin/apt-install \ diff --git a/docker/php/debian-9-php7/conf/etc/logrotate.d/php5-fpm b/docker/php/debian-9-php7/conf/etc/logrotate.d/php5-fpm new file mode 100644 index 000000000..e6ef4b123 --- /dev/null +++ b/docker/php/debian-9-php7/conf/etc/logrotate.d/php5-fpm @@ -0,0 +1,12 @@ +/var/log/php5-fpm/fpm.log +/var/log/php5-fpm/access.log +/var/log/php5-fpm/slow.log +/var/log/php5-fpm/error.log { + missingok + notifempty + sharedscripts + delaycompress + postrotate + /bin/kill -SIGUSR1 `cat /var/run/php5-fpm.pid` 2>/dev/null || true + endscript +} diff --git a/docker/php/debian-9-php7/conf/etc/supervisor.d/php-fpm.conf b/docker/php/debian-9-php7/conf/etc/supervisor.d/php-fpm.conf index 21f6579e1..33e894d11 100644 --- a/docker/php/debian-9-php7/conf/etc/supervisor.d/php-fpm.conf +++ b/docker/php/debian-9-php7/conf/etc/supervisor.d/php-fpm.conf @@ -3,7 +3,7 @@ programs=php-fpmd,php-fpm-log-fpm,php-fpm-log-slow,php-fpm-log-error,php-fpm-log priority=20 [program:php-fpmd] -command = /usr/sbin/php-fpm7.0 --nodaemonize +command = /usr/sbin/php-fpm --nodaemonize process_name=%(program_name)s startsecs = 0 autostart = true @@ -14,7 +14,7 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:php-fpm-log-fpm] -command = bash /opt/docker/bin/logwatch.sh php:fpm /var/log/php7-fpm/fpm.log +command = bash /opt/docker/bin/logwatch.sh php:fpm /var/log/php5-fpm/fpm.log startsecs = 0 autostart = true autorestart = true @@ -24,7 +24,7 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:php-fpm-log-slow] -command = bash /opt/docker/bin/logwatch.sh php:slow /var/log/php7-fpm/slow.log +command = bash /opt/docker/bin/logwatch.sh php:slow /var/log/php5-fpm/slow.log startsecs = 0 autostart = true autorestart = true @@ -34,7 +34,7 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:php-fpm-log-error] -command = bash /opt/docker/bin/logwatch.sh php:error /var/log/php7-fpm/error.log +command = bash /opt/docker/bin/logwatch.sh php:error /var/log/php5-fpm/error.log startsecs = 0 autostart = true autorestart = true @@ -44,7 +44,7 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:php-fpm-log-access] -command = bash /opt/docker/bin/logwatch.sh php:access /var/log/php7-fpm/access.log +command = bash /opt/docker/bin/logwatch.sh php:access /var/log/php5-fpm/access.log startsecs = 0 autostart = true autorestart = true diff --git a/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml b/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml index d26b22778..82c7effa6 100644 --- a/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml +++ b/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml @@ -10,6 +10,11 @@ php_main_conf: /etc/php/7.0/fpm/php-fpm.conf when: ansible_os_family == 'Debian' +- name: Set php main file + set_fact: + php_main_conf: /etc/php7/php-fpm.conf + when: ansible_os_family == 'Alpine' + - name: Create php directories file: path: "{{ item }}" @@ -22,6 +27,13 @@ - name: Move php-fpm main file to /opt/docker/etc/php/fpm/ command: "mv {{ php_main_conf }} /opt/docker/etc/php/fpm/php-fpm.conf" + args: + creates: /opt/docker/etc/php/fpm/php-fpm.conf + +- name: Remove php-fpm main file + file: + path: "{{ php_main_conf }}" + state: absent - name: Symlink php-fpm main file file: diff --git a/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml b/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml index 3f3865fae..126c4b4a3 100644 --- a/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml +++ b/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml @@ -12,6 +12,12 @@ php_pool_dir: /etc/php/7.0/fpm/pool.d when: ansible_os_family == 'Debian' +- name: Set php pool file + set_fact: + php_pool_conf: www.conf + php_pool_dir: /etc/php7/php-fpm.d + when: ansible_os_family == 'Alpine' + - name: Create php directories file: path: "{{ item }}" @@ -24,9 +30,18 @@ - name: Move php-fpm pool directory file to /opt/docker/etc/php/ command: "mv {{ php_pool_dir }} /opt/docker/etc/php/fpm/pool.d" + args: + creates: /opt/docker/etc/php/fpm/pool.d - name: Rename pool file file to application.conf" command: "mv /opt/docker/etc/php/fpm/pool.d/{{ php_pool_conf }} /opt/docker/etc/php/fpm/pool.d/application.conf" + args: + creates: /opt/docker/etc/php/fpm/pool.d/application.conf + +- name: Remove php-fpm pool directory + file: + path: "{{ php_pool_dir }}" + state: absent - name: Symlink php-fpm main file file: diff --git a/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml index 89e71f8b5..130542f53 100644 --- a/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml +++ b/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -1,14 +1,32 @@ --- -- name: Symlink php-fpm binary +- name: Symlink php-fpm binary [RedHat family] file: path: "/usr/sbin/php-fpm7.0" - src: "/sbin/php-fpm" + src: "/usr/sbin/php-fpm" state: link owner: "root" group: "root" when: ansible_os_family == 'RedHat' +- name: Symlink php-fpm binary [Alpine family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php-fpm7" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php-fpm7.0" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' + - name: Remove default php-fpm logrotate file: path: "/etc/logrotate.d/php-fpm" diff --git a/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml b/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml index 6f784be1b..e195ee9e6 100644 --- a/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml +++ b/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml @@ -1,3 +1,17 @@ --- -# Currently not available +- name: Set php xdebug file [Alpine family] + set_fact: + php_xdebug_conf: /etc/php7/conf.d/xdebug.ini + when: ansible_distribution == 'Alpine' + +- name: Disable xdebug + replace: + dest: '{{ php_xdebug_conf }}' + regexp: '^[\s]*({{ item }}[\s]*=.*)$' + replace: ';\1' + with_items: + - 'zend_extension' + - 'extension' + ignore_errors: yes + when: php_xdebug_conf is defined diff --git a/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php.yml b/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php.yml index b7f7ea20e..84795d592 100644 --- a/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php.yml +++ b/docker/php/debian-9-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php.yml @@ -30,4 +30,13 @@ - { category: 'cli', file: '/opt/docker/etc/php/php.ini', target: '99-docker.ini' } # PHP fpm - { category: 'fpm', file: '/opt/docker/etc/php/php.ini', target: '99-docker.ini' } + when: ansible_os_family == 'Debian' + +- name: Link php.ini + file: + src: '/opt/docker/etc/php/php.ini' + dest: '/etc/php7/conf.d/99-docker.ini' + force: yes + state: link + when: ansible_os_family == 'Alpine' diff --git a/docker/php/debian-9/Dockerfile b/docker/php/debian-9/Dockerfile index 66a72c7f4..a711daab6 100644 --- a/docker/php/debian-9/Dockerfile +++ b/docker/php/debian-9/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:debian-9 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Install tools RUN /usr/local/bin/apt-install \ diff --git a/docker/php/debian-9/conf/etc/supervisor.d/php-fpm.conf b/docker/php/debian-9/conf/etc/supervisor.d/php-fpm.conf index 228843358..33e894d11 100644 --- a/docker/php/debian-9/conf/etc/supervisor.d/php-fpm.conf +++ b/docker/php/debian-9/conf/etc/supervisor.d/php-fpm.conf @@ -3,7 +3,7 @@ programs=php-fpmd,php-fpm-log-fpm,php-fpm-log-slow,php-fpm-log-error,php-fpm-log priority=20 [program:php-fpmd] -command = /usr/sbin/php5-fpm --nodaemonize +command = /usr/sbin/php-fpm --nodaemonize process_name=%(program_name)s startsecs = 0 autostart = true diff --git a/docker/php/debian-9/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/docker/php/debian-9/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml index cac44982b..d83edb3ae 100644 --- a/docker/php/debian-9/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml +++ b/docker/php/debian-9/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -1,13 +1,22 @@ --- -- name: Symlink php-fpm binary +- name: Symlink php-fpm binary [Alpine family] file: - path: "/usr/sbin/php5-fpm" - src: "/sbin/php-fpm" + path: "/usr/sbin/php-fpm" + src: "/usr/bin/php-fpm" state: link owner: "root" group: "root" - when: ansible_os_family == 'RedHat' + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php5-fpm" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' - name: Remove default php-fpm logrotate file: diff --git a/docker/php/ubuntu-12.04/Dockerfile b/docker/php/ubuntu-12.04/Dockerfile index b4205f860..0abed7f28 100644 --- a/docker/php/ubuntu-12.04/Dockerfile +++ b/docker/php/ubuntu-12.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:ubuntu-12.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Install tools RUN /usr/local/bin/apt-install \ diff --git a/docker/php/ubuntu-12.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/docker/php/ubuntu-12.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml index cac44982b..d83edb3ae 100644 --- a/docker/php/ubuntu-12.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml +++ b/docker/php/ubuntu-12.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -1,13 +1,22 @@ --- -- name: Symlink php-fpm binary +- name: Symlink php-fpm binary [Alpine family] file: - path: "/usr/sbin/php5-fpm" - src: "/sbin/php-fpm" + path: "/usr/sbin/php-fpm" + src: "/usr/bin/php-fpm" state: link owner: "root" group: "root" - when: ansible_os_family == 'RedHat' + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php5-fpm" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' - name: Remove default php-fpm logrotate file: diff --git a/docker/php/ubuntu-14.04/Dockerfile b/docker/php/ubuntu-14.04/Dockerfile index 766299fff..b226b04ed 100644 --- a/docker/php/ubuntu-14.04/Dockerfile +++ b/docker/php/ubuntu-14.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:ubuntu-14.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Install tools RUN /usr/local/bin/apt-install \ diff --git a/docker/php/ubuntu-14.04/conf/etc/supervisor.d/php-fpm.conf b/docker/php/ubuntu-14.04/conf/etc/supervisor.d/php-fpm.conf index 228843358..33e894d11 100644 --- a/docker/php/ubuntu-14.04/conf/etc/supervisor.d/php-fpm.conf +++ b/docker/php/ubuntu-14.04/conf/etc/supervisor.d/php-fpm.conf @@ -3,7 +3,7 @@ programs=php-fpmd,php-fpm-log-fpm,php-fpm-log-slow,php-fpm-log-error,php-fpm-log priority=20 [program:php-fpmd] -command = /usr/sbin/php5-fpm --nodaemonize +command = /usr/sbin/php-fpm --nodaemonize process_name=%(program_name)s startsecs = 0 autostart = true diff --git a/docker/php/ubuntu-14.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/docker/php/ubuntu-14.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml index cac44982b..d83edb3ae 100644 --- a/docker/php/ubuntu-14.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml +++ b/docker/php/ubuntu-14.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -1,13 +1,22 @@ --- -- name: Symlink php-fpm binary +- name: Symlink php-fpm binary [Alpine family] file: - path: "/usr/sbin/php5-fpm" - src: "/sbin/php-fpm" + path: "/usr/sbin/php-fpm" + src: "/usr/bin/php-fpm" state: link owner: "root" group: "root" - when: ansible_os_family == 'RedHat' + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php5-fpm" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' - name: Remove default php-fpm logrotate file: diff --git a/docker/php/ubuntu-15.04/Dockerfile b/docker/php/ubuntu-15.04/Dockerfile index 84520eacd..ee311a52b 100644 --- a/docker/php/ubuntu-15.04/Dockerfile +++ b/docker/php/ubuntu-15.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:ubuntu-15.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Install tools RUN /usr/local/bin/apt-install \ diff --git a/docker/php/ubuntu-15.04/conf/etc/supervisor.d/php-fpm.conf b/docker/php/ubuntu-15.04/conf/etc/supervisor.d/php-fpm.conf index 228843358..33e894d11 100644 --- a/docker/php/ubuntu-15.04/conf/etc/supervisor.d/php-fpm.conf +++ b/docker/php/ubuntu-15.04/conf/etc/supervisor.d/php-fpm.conf @@ -3,7 +3,7 @@ programs=php-fpmd,php-fpm-log-fpm,php-fpm-log-slow,php-fpm-log-error,php-fpm-log priority=20 [program:php-fpmd] -command = /usr/sbin/php5-fpm --nodaemonize +command = /usr/sbin/php-fpm --nodaemonize process_name=%(program_name)s startsecs = 0 autostart = true diff --git a/docker/php/ubuntu-15.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/docker/php/ubuntu-15.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml index cac44982b..d83edb3ae 100644 --- a/docker/php/ubuntu-15.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml +++ b/docker/php/ubuntu-15.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -1,13 +1,22 @@ --- -- name: Symlink php-fpm binary +- name: Symlink php-fpm binary [Alpine family] file: - path: "/usr/sbin/php5-fpm" - src: "/sbin/php-fpm" + path: "/usr/sbin/php-fpm" + src: "/usr/bin/php-fpm" state: link owner: "root" group: "root" - when: ansible_os_family == 'RedHat' + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php5-fpm" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' - name: Remove default php-fpm logrotate file: diff --git a/docker/php/ubuntu-15.10/Dockerfile b/docker/php/ubuntu-15.10/Dockerfile index 83584adb3..20f07ab14 100644 --- a/docker/php/ubuntu-15.10/Dockerfile +++ b/docker/php/ubuntu-15.10/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:ubuntu-15.10 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Install tools RUN /usr/local/bin/apt-install \ diff --git a/docker/php/ubuntu-15.10/conf/etc/supervisor.d/php-fpm.conf b/docker/php/ubuntu-15.10/conf/etc/supervisor.d/php-fpm.conf index 228843358..33e894d11 100644 --- a/docker/php/ubuntu-15.10/conf/etc/supervisor.d/php-fpm.conf +++ b/docker/php/ubuntu-15.10/conf/etc/supervisor.d/php-fpm.conf @@ -3,7 +3,7 @@ programs=php-fpmd,php-fpm-log-fpm,php-fpm-log-slow,php-fpm-log-error,php-fpm-log priority=20 [program:php-fpmd] -command = /usr/sbin/php5-fpm --nodaemonize +command = /usr/sbin/php-fpm --nodaemonize process_name=%(program_name)s startsecs = 0 autostart = true diff --git a/docker/php/ubuntu-15.10/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/docker/php/ubuntu-15.10/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml index cac44982b..d83edb3ae 100644 --- a/docker/php/ubuntu-15.10/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml +++ b/docker/php/ubuntu-15.10/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -1,13 +1,22 @@ --- -- name: Symlink php-fpm binary +- name: Symlink php-fpm binary [Alpine family] file: - path: "/usr/sbin/php5-fpm" - src: "/sbin/php-fpm" + path: "/usr/sbin/php-fpm" + src: "/usr/bin/php-fpm" state: link owner: "root" group: "root" - when: ansible_os_family == 'RedHat' + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php5-fpm" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' - name: Remove default php-fpm logrotate file: diff --git a/docker/php/ubuntu-16.04-php7/Dockerfile b/docker/php/ubuntu-16.04-php7/Dockerfile index 20cfc4075..38e84635e 100644 --- a/docker/php/ubuntu-16.04-php7/Dockerfile +++ b/docker/php/ubuntu-16.04-php7/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:ubuntu-16.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Install tools RUN /usr/local/bin/apt-install \ diff --git a/docker/php/ubuntu-16.04-php7/conf/etc/supervisor.d/php-fpm.conf b/docker/php/ubuntu-16.04-php7/conf/etc/supervisor.d/php-fpm.conf index 21f6579e1..33e894d11 100644 --- a/docker/php/ubuntu-16.04-php7/conf/etc/supervisor.d/php-fpm.conf +++ b/docker/php/ubuntu-16.04-php7/conf/etc/supervisor.d/php-fpm.conf @@ -3,7 +3,7 @@ programs=php-fpmd,php-fpm-log-fpm,php-fpm-log-slow,php-fpm-log-error,php-fpm-log priority=20 [program:php-fpmd] -command = /usr/sbin/php-fpm7.0 --nodaemonize +command = /usr/sbin/php-fpm --nodaemonize process_name=%(program_name)s startsecs = 0 autostart = true @@ -14,7 +14,7 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:php-fpm-log-fpm] -command = bash /opt/docker/bin/logwatch.sh php:fpm /var/log/php7-fpm/fpm.log +command = bash /opt/docker/bin/logwatch.sh php:fpm /var/log/php5-fpm/fpm.log startsecs = 0 autostart = true autorestart = true @@ -24,7 +24,7 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:php-fpm-log-slow] -command = bash /opt/docker/bin/logwatch.sh php:slow /var/log/php7-fpm/slow.log +command = bash /opt/docker/bin/logwatch.sh php:slow /var/log/php5-fpm/slow.log startsecs = 0 autostart = true autorestart = true @@ -34,7 +34,7 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:php-fpm-log-error] -command = bash /opt/docker/bin/logwatch.sh php:error /var/log/php7-fpm/error.log +command = bash /opt/docker/bin/logwatch.sh php:error /var/log/php5-fpm/error.log startsecs = 0 autostart = true autorestart = true @@ -44,7 +44,7 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:php-fpm-log-access] -command = bash /opt/docker/bin/logwatch.sh php:access /var/log/php7-fpm/access.log +command = bash /opt/docker/bin/logwatch.sh php:access /var/log/php5-fpm/access.log startsecs = 0 autostart = true autorestart = true diff --git a/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml b/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml index d26b22778..82c7effa6 100644 --- a/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml +++ b/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml @@ -10,6 +10,11 @@ php_main_conf: /etc/php/7.0/fpm/php-fpm.conf when: ansible_os_family == 'Debian' +- name: Set php main file + set_fact: + php_main_conf: /etc/php7/php-fpm.conf + when: ansible_os_family == 'Alpine' + - name: Create php directories file: path: "{{ item }}" @@ -22,6 +27,13 @@ - name: Move php-fpm main file to /opt/docker/etc/php/fpm/ command: "mv {{ php_main_conf }} /opt/docker/etc/php/fpm/php-fpm.conf" + args: + creates: /opt/docker/etc/php/fpm/php-fpm.conf + +- name: Remove php-fpm main file + file: + path: "{{ php_main_conf }}" + state: absent - name: Symlink php-fpm main file file: diff --git a/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml b/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml index 3f3865fae..126c4b4a3 100644 --- a/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml +++ b/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml @@ -12,6 +12,12 @@ php_pool_dir: /etc/php/7.0/fpm/pool.d when: ansible_os_family == 'Debian' +- name: Set php pool file + set_fact: + php_pool_conf: www.conf + php_pool_dir: /etc/php7/php-fpm.d + when: ansible_os_family == 'Alpine' + - name: Create php directories file: path: "{{ item }}" @@ -24,9 +30,18 @@ - name: Move php-fpm pool directory file to /opt/docker/etc/php/ command: "mv {{ php_pool_dir }} /opt/docker/etc/php/fpm/pool.d" + args: + creates: /opt/docker/etc/php/fpm/pool.d - name: Rename pool file file to application.conf" command: "mv /opt/docker/etc/php/fpm/pool.d/{{ php_pool_conf }} /opt/docker/etc/php/fpm/pool.d/application.conf" + args: + creates: /opt/docker/etc/php/fpm/pool.d/application.conf + +- name: Remove php-fpm pool directory + file: + path: "{{ php_pool_dir }}" + state: absent - name: Symlink php-fpm main file file: diff --git a/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml index 89e71f8b5..130542f53 100644 --- a/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml +++ b/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -1,14 +1,32 @@ --- -- name: Symlink php-fpm binary +- name: Symlink php-fpm binary [RedHat family] file: path: "/usr/sbin/php-fpm7.0" - src: "/sbin/php-fpm" + src: "/usr/sbin/php-fpm" state: link owner: "root" group: "root" when: ansible_os_family == 'RedHat' +- name: Symlink php-fpm binary [Alpine family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php-fpm7" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php-fpm7.0" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' + - name: Remove default php-fpm logrotate file: path: "/etc/logrotate.d/php-fpm" diff --git a/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml b/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml index 6f784be1b..e195ee9e6 100644 --- a/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml +++ b/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml @@ -1,3 +1,17 @@ --- -# Currently not available +- name: Set php xdebug file [Alpine family] + set_fact: + php_xdebug_conf: /etc/php7/conf.d/xdebug.ini + when: ansible_distribution == 'Alpine' + +- name: Disable xdebug + replace: + dest: '{{ php_xdebug_conf }}' + regexp: '^[\s]*({{ item }}[\s]*=.*)$' + replace: ';\1' + with_items: + - 'zend_extension' + - 'extension' + ignore_errors: yes + when: php_xdebug_conf is defined diff --git a/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php.yml b/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php.yml index b7f7ea20e..84795d592 100644 --- a/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php.yml +++ b/docker/php/ubuntu-16.04-php7/conf/provision/roles/webdevops-php/tasks/bootstrap/php.yml @@ -30,4 +30,13 @@ - { category: 'cli', file: '/opt/docker/etc/php/php.ini', target: '99-docker.ini' } # PHP fpm - { category: 'fpm', file: '/opt/docker/etc/php/php.ini', target: '99-docker.ini' } + when: ansible_os_family == 'Debian' + +- name: Link php.ini + file: + src: '/opt/docker/etc/php/php.ini' + dest: '/etc/php7/conf.d/99-docker.ini' + force: yes + state: link + when: ansible_os_family == 'Alpine' diff --git a/docker/php/ubuntu-16.04/Dockerfile b/docker/php/ubuntu-16.04/Dockerfile index d35373a77..22d936a4d 100644 --- a/docker/php/ubuntu-16.04/Dockerfile +++ b/docker/php/ubuntu-16.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:ubuntu-16.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Install tools RUN /usr/local/bin/apt-install \ diff --git a/docker/php/ubuntu-16.04/conf/etc/supervisor.d/php-fpm.conf b/docker/php/ubuntu-16.04/conf/etc/supervisor.d/php-fpm.conf index 228843358..33e894d11 100644 --- a/docker/php/ubuntu-16.04/conf/etc/supervisor.d/php-fpm.conf +++ b/docker/php/ubuntu-16.04/conf/etc/supervisor.d/php-fpm.conf @@ -3,7 +3,7 @@ programs=php-fpmd,php-fpm-log-fpm,php-fpm-log-slow,php-fpm-log-error,php-fpm-log priority=20 [program:php-fpmd] -command = /usr/sbin/php5-fpm --nodaemonize +command = /usr/sbin/php-fpm --nodaemonize process_name=%(program_name)s startsecs = 0 autostart = true diff --git a/docker/php/ubuntu-16.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/docker/php/ubuntu-16.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml index cac44982b..d83edb3ae 100644 --- a/docker/php/ubuntu-16.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml +++ b/docker/php/ubuntu-16.04/conf/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -1,13 +1,22 @@ --- -- name: Symlink php-fpm binary +- name: Symlink php-fpm binary [Alpine family] file: - path: "/usr/sbin/php5-fpm" - src: "/sbin/php-fpm" + path: "/usr/sbin/php-fpm" + src: "/usr/bin/php-fpm" state: link owner: "root" group: "root" - when: ansible_os_family == 'RedHat' + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php5-fpm" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' - name: Remove default php-fpm logrotate file: diff --git a/docker/piwik/ubuntu-14.04/Dockerfile b/docker/piwik/ubuntu-14.04/Dockerfile index f71be216b..2bce8c33d 100644 --- a/docker/piwik/ubuntu-14.04/Dockerfile +++ b/docker/piwik/ubuntu-14.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php-nginx:ubuntu-14.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app/piwik/ ENV PIWIK_URL http://example.com/ diff --git a/docker/postfix/latest/Dockerfile b/docker/postfix/latest/Dockerfile index ec991f74d..f9f14106d 100644 --- a/docker/postfix/latest/Dockerfile +++ b/docker/postfix/latest/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:latest MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Deploy scripts/configurations COPY conf/ /opt/docker/ diff --git a/docker/samson-deployment/latest/Dockerfile b/docker/samson-deployment/latest/Dockerfile index 73419a239..26d70662c 100644 --- a/docker/samson-deployment/latest/Dockerfile +++ b/docker/samson-deployment/latest/Dockerfile @@ -2,7 +2,7 @@ FROM zendesk/samson MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ############################################################################### # Bootstrap diff --git a/docker/sphinx/latest/Dockerfile b/docker/sphinx/latest/Dockerfile index 33d9b6ad9..045695ae4 100644 --- a/docker/sphinx/latest/Dockerfile +++ b/docker/sphinx/latest/Dockerfile @@ -6,9 +6,10 @@ FROM webdevops/bootstrap:alpine-3 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.22.0 +LABEL io.webdevops.version=0.23.0 RUN /usr/local/bin/apk-install \ + # General sphinx py-pillow \ py-yaml \ py-sphinx \ @@ -18,4 +19,9 @@ RUN /usr/local/bin/apk-install \ && pip install --upgrade sphinxcontrib-httpdomain \ && pip install --upgrade sphinxcontrib-slide \ && pip install --upgrade sphinx-autobuild \ - && pip install --upgrade recommonmark + && pip install --upgrade recommonmark \ + # TYPO3 stuff + && pip install t3SphinxThemeRtd \ + && pip install t3fieldlisttable \ + && pip install t3tablerows \ + && pip install t3targets diff --git a/docker/ssh/latest/Dockerfile b/docker/ssh/latest/Dockerfile index 55d2f76dd..56294f202 100644 --- a/docker/ssh/latest/Dockerfile +++ b/docker/ssh/latest/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base-app:ubuntu-14.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 RUN mkdir -p /var/run/sshd \ && bash /opt/docker/bin/control.sh service.enable ssh diff --git a/docker/storage/latest/Dockerfile b/docker/storage/latest/Dockerfile index cb854393d..c1f7c8468 100644 --- a/docker/storage/latest/Dockerfile +++ b/docker/storage/latest/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:latest MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 # Deploy scripts/configurations COPY . /opt/docker/ diff --git a/docker/typo3/ubuntu-14.04/Dockerfile b/docker/typo3/ubuntu-14.04/Dockerfile index 151749c4d..6ac9f768f 100644 --- a/docker/typo3/ubuntu-14.04/Dockerfile +++ b/docker/typo3/ubuntu-14.04/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/php-apache:ubuntu-14.04 MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV WEB_DOCUMENT_ROOT /app/web/ diff --git a/docker/vsftp/latest/Dockerfile b/docker/vsftp/latest/Dockerfile index f33f9bd1d..55f90fdaa 100644 --- a/docker/vsftp/latest/Dockerfile +++ b/docker/vsftp/latest/Dockerfile @@ -6,7 +6,7 @@ FROM webdevops/base:latest MAINTAINER info@webdevops.io LABEL vendor=WebDevOps.io LABEL io.webdevops.layout=6 -LABEL io.webdevops.version=0.21.0 +LABEL io.webdevops.version=0.23.0 ENV FTP_USER application ENV FTP_PASSWORD application diff --git a/provisioning/php/alpine/etc/php/fpm/php-fpm.conf b/provisioning/php/alpine/etc/php/fpm/php-fpm.conf index 596980343..b69cd8170 100644 --- a/provisioning/php/alpine/etc/php/fpm/php-fpm.conf +++ b/provisioning/php/alpine/etc/php/fpm/php-fpm.conf @@ -115,4 +115,4 @@ error_log = /var/log/php-fpm.log ; Relative path can also be used. They will be prefixed by: ; - the global prefix if it's been set (-p argument) ; - /usr otherwise -include=/etc/php/fpm.d/*.conf +include=/opt/docker/etc/php/fpm/pool.d/*.conf diff --git a/provisioning/php/general/etc/supervisor.d/php-fpm.conf b/provisioning/php/general/etc/supervisor.d/php-fpm.conf index 228843358..33e894d11 100644 --- a/provisioning/php/general/etc/supervisor.d/php-fpm.conf +++ b/provisioning/php/general/etc/supervisor.d/php-fpm.conf @@ -3,7 +3,7 @@ programs=php-fpmd,php-fpm-log-fpm,php-fpm-log-slow,php-fpm-log-error,php-fpm-log priority=20 [program:php-fpmd] -command = /usr/sbin/php5-fpm --nodaemonize +command = /usr/sbin/php-fpm --nodaemonize process_name=%(program_name)s startsecs = 0 autostart = true diff --git a/provisioning/php/general/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/provisioning/php/general/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml index cac44982b..d83edb3ae 100644 --- a/provisioning/php/general/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml +++ b/provisioning/php/general/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -1,13 +1,22 @@ --- -- name: Symlink php-fpm binary +- name: Symlink php-fpm binary [Alpine family] file: - path: "/usr/sbin/php5-fpm" - src: "/sbin/php-fpm" + path: "/usr/sbin/php-fpm" + src: "/usr/bin/php-fpm" state: link owner: "root" group: "root" - when: ansible_os_family == 'RedHat' + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php5-fpm" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' - name: Remove default php-fpm logrotate file: diff --git a/provisioning/php/php7/etc/supervisor.d/php-fpm.conf b/provisioning/php/php7/etc/supervisor.d/php-fpm.conf deleted file mode 100644 index 21f6579e1..000000000 --- a/provisioning/php/php7/etc/supervisor.d/php-fpm.conf +++ /dev/null @@ -1,54 +0,0 @@ -[group:php-fpm] -programs=php-fpmd,php-fpm-log-fpm,php-fpm-log-slow,php-fpm-log-error,php-fpm-log-access -priority=20 - -[program:php-fpmd] -command = /usr/sbin/php-fpm7.0 --nodaemonize -process_name=%(program_name)s -startsecs = 0 -autostart = true -autorestart = true -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 - -[program:php-fpm-log-fpm] -command = bash /opt/docker/bin/logwatch.sh php:fpm /var/log/php7-fpm/fpm.log -startsecs = 0 -autostart = true -autorestart = true -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 - -[program:php-fpm-log-slow] -command = bash /opt/docker/bin/logwatch.sh php:slow /var/log/php7-fpm/slow.log -startsecs = 0 -autostart = true -autorestart = true -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 - -[program:php-fpm-log-error] -command = bash /opt/docker/bin/logwatch.sh php:error /var/log/php7-fpm/error.log -startsecs = 0 -autostart = true -autorestart = true -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 - -[program:php-fpm-log-access] -command = bash /opt/docker/bin/logwatch.sh php:access /var/log/php7-fpm/access.log -startsecs = 0 -autostart = true -autorestart = true -stdout_logfile=/dev/stdout -stdout_logfile_maxbytes=0 -stderr_logfile=/dev/stderr -stderr_logfile_maxbytes=0 diff --git a/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml b/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml index d26b22778..82c7effa6 100644 --- a/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml +++ b/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.main.yml @@ -10,6 +10,11 @@ php_main_conf: /etc/php/7.0/fpm/php-fpm.conf when: ansible_os_family == 'Debian' +- name: Set php main file + set_fact: + php_main_conf: /etc/php7/php-fpm.conf + when: ansible_os_family == 'Alpine' + - name: Create php directories file: path: "{{ item }}" @@ -22,6 +27,13 @@ - name: Move php-fpm main file to /opt/docker/etc/php/fpm/ command: "mv {{ php_main_conf }} /opt/docker/etc/php/fpm/php-fpm.conf" + args: + creates: /opt/docker/etc/php/fpm/php-fpm.conf + +- name: Remove php-fpm main file + file: + path: "{{ php_main_conf }}" + state: absent - name: Symlink php-fpm main file file: diff --git a/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml b/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml index 3f3865fae..126c4b4a3 100644 --- a/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml +++ b/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.pool.yml @@ -12,6 +12,12 @@ php_pool_dir: /etc/php/7.0/fpm/pool.d when: ansible_os_family == 'Debian' +- name: Set php pool file + set_fact: + php_pool_conf: www.conf + php_pool_dir: /etc/php7/php-fpm.d + when: ansible_os_family == 'Alpine' + - name: Create php directories file: path: "{{ item }}" @@ -24,9 +30,18 @@ - name: Move php-fpm pool directory file to /opt/docker/etc/php/ command: "mv {{ php_pool_dir }} /opt/docker/etc/php/fpm/pool.d" + args: + creates: /opt/docker/etc/php/fpm/pool.d - name: Rename pool file file to application.conf" command: "mv /opt/docker/etc/php/fpm/pool.d/{{ php_pool_conf }} /opt/docker/etc/php/fpm/pool.d/application.conf" + args: + creates: /opt/docker/etc/php/fpm/pool.d/application.conf + +- name: Remove php-fpm pool directory + file: + path: "{{ php_pool_dir }}" + state: absent - name: Symlink php-fpm main file file: diff --git a/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml b/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml index 89e71f8b5..130542f53 100644 --- a/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml +++ b/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-fpm.yml @@ -1,14 +1,32 @@ --- -- name: Symlink php-fpm binary +- name: Symlink php-fpm binary [RedHat family] file: path: "/usr/sbin/php-fpm7.0" - src: "/sbin/php-fpm" + src: "/usr/sbin/php-fpm" state: link owner: "root" group: "root" when: ansible_os_family == 'RedHat' +- name: Symlink php-fpm binary [Alpine family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php-fpm7" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Alpine' + +- name: Symlink php-fpm binary [Debian family] + file: + path: "/usr/sbin/php-fpm" + src: "/usr/sbin/php-fpm7.0" + state: link + owner: "root" + group: "root" + when: ansible_os_family == 'Debian' + - name: Remove default php-fpm logrotate file: path: "/etc/logrotate.d/php-fpm" diff --git a/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml b/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml index 6f784be1b..e195ee9e6 100644 --- a/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml +++ b/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php-module.xdebug.yml @@ -1,3 +1,17 @@ --- -# Currently not available +- name: Set php xdebug file [Alpine family] + set_fact: + php_xdebug_conf: /etc/php7/conf.d/xdebug.ini + when: ansible_distribution == 'Alpine' + +- name: Disable xdebug + replace: + dest: '{{ php_xdebug_conf }}' + regexp: '^[\s]*({{ item }}[\s]*=.*)$' + replace: ';\1' + with_items: + - 'zend_extension' + - 'extension' + ignore_errors: yes + when: php_xdebug_conf is defined diff --git a/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php.yml b/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php.yml index b7f7ea20e..84795d592 100644 --- a/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php.yml +++ b/provisioning/php/php7/provision/roles/webdevops-php/tasks/bootstrap/php.yml @@ -30,4 +30,13 @@ - { category: 'cli', file: '/opt/docker/etc/php/php.ini', target: '99-docker.ini' } # PHP fpm - { category: 'fpm', file: '/opt/docker/etc/php/php.ini', target: '99-docker.ini' } + when: ansible_os_family == 'Debian' + +- name: Link php.ini + file: + src: '/opt/docker/etc/php/php.ini' + dest: '/etc/php7/conf.d/99-docker.ini' + force: yes + state: link + when: ansible_os_family == 'Alpine' diff --git a/test/run.sh b/test/run.sh index 7ea288c85..ed40c6924 100755 --- a/test/run.sh +++ b/test/run.sh @@ -318,6 +318,8 @@ initEnvironment setEnvironmentOsFamily "alpine" OS_VERSION="3" runTestForTag "alpine-3" + waitForTestRun + ########## # PHP 7 ########## @@ -421,6 +423,8 @@ initEnvironment setEnvironmentOsFamily "alpine" OS_VERSION="3" runTestForTag "alpine-3" + waitForTestRun + ########## # PHP 7 ########## @@ -470,6 +474,8 @@ initEnvironment setEnvironmentOsFamily "alpine" OS_VERSION="3" runTestForTag "alpine-3" + waitForTestRun + ########## # PHP 7 ########## diff --git a/test/spec/shared/base/layout.rb b/test/spec/shared/base/layout.rb index 259b51095..4afac531c 100644 --- a/test/spec/shared/base/layout.rb +++ b/test/spec/shared/base/layout.rb @@ -92,6 +92,7 @@ "/opt/docker/bin/logwatch.sh", "/opt/docker/bin/provision.sh", "/opt/docker/bin/service.d/syslog-ng.sh", + "/opt/docker/bin/service.d/supervisor.sh", "/opt/docker/bin/entrypoint.d/cli.sh", "/opt/docker/bin/entrypoint.d/default.sh", "/opt/docker/bin/entrypoint.d/noop.sh", diff --git a/test/spec/shared/php/modules.rb b/test/spec/shared/php/modules.rb index 84910eda5..a8644c7ed 100644 --- a/test/spec/shared/php/modules.rb +++ b/test/spec/shared/php/modules.rb @@ -19,7 +19,6 @@ its(:stdout) { should contain('fileinfo') } its(:stdout) { should contain('filter') } its(:stdout) { should contain('ftp') } - its(:stdout) { should contain('gd') } its(:stdout) { should contain('gettext') } its(:stdout) { should contain('hash') } its(:stdout) { should contain('iconv') } @@ -58,6 +57,10 @@ its(:stdout) { should contain('zip') } its(:stdout) { should contain('zlib') } + if ( os[:family] != 'alpine' ) + its(:stdout) { should contain('gd') } + end + its(:exit_status) { should eq 0 } end end @@ -114,7 +117,6 @@ its(:stdout) { should contain('fileinfo') } its(:stdout) { should contain('filter') } its(:stdout) { should contain('ftp') } - its(:stdout) { should contain('gd') } its(:stdout) { should contain('gettext') } its(:stdout) { should contain('hash') } its(:stdout) { should contain('iconv') } @@ -153,6 +155,10 @@ its(:stdout) { should contain('zip') } its(:stdout) { should contain('zlib') } + if ( os[:family] != 'alpine' ) + its(:stdout) { should contain('gd') } + end + its(:exit_status) { should eq 0 } end end diff --git a/test/spec/spec_helper.rb b/test/spec/spec_helper.rb index cadbc9d94..5aa57ed41 100644 --- a/test/spec/spec_helper.rb +++ b/test/spec/spec_helper.rb @@ -9,6 +9,9 @@ set :docker_container, ENV['DOCKER_IMAGE'] set :os, :family => ENV['OS_FAMILY'], :version => ENV['OS_VERSION'], :arch => 'x86_64' +Excon.defaults[:write_timeout] = 1000 +Excon.defaults[:read_timeout] = 1000 + $packageVersions = {} $packageVersions[:ansible] = %r!ansible 2.([0-9]\.?)+! $packageVersions[:ansiblePlaybook] = %r!ansible-playbook 2.([0-9]\.?)+!