diff --git a/.devilbox/www/config.php b/.devilbox/www/config.php
index fe01a8b8..30ab1a9f 100644
--- a/.devilbox/www/config.php
+++ b/.devilbox/www/config.php
@@ -13,8 +13,8 @@ error_reporting(-1);
putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1');
-$DEVILBOX_VERSION = 'v1.5.0';
-$DEVILBOX_DATE = '2020-01-03';
+$DEVILBOX_VERSION = 'v1.6.0';
+$DEVILBOX_DATE = '2020-01-04';
$DEVILBOX_API_PAGE = 'devilbox-api/status.json';
//
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 00000000..40f41966
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,2 @@
+github: [cytopia]
+patreon: cytopia
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c667b9c8..eb428591 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,17 @@ major versions.
## Unreleased
+## Release v1.6.0 (2020-01-04)
+
+#### Changed
+- [#642](https://github.com/cytopia/devilbox/issues/642) Make email catch-all configurable
+- [#265](https://github.com/cytopia/devilbox/issues/265) Make SSL vhost settings configurable
+
+#### Added
+- [#615](https://github.com/cytopia/devilbox/issues/615) Add phpmd
+- [#378](https://github.com/cytopia/devilbox/issues/378) Allow to mount local `.ssh/` directory into PHP container (read-only)
+
+
## Release v1.5.0 (2020-01-03)
#### Added
diff --git a/docker-compose.yml b/docker-compose.yml
index 52ad83ca..9adfb334 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -95,7 +95,7 @@ services:
# PHP
# ------------------------------------------------------------
php:
- image: devilbox/php-fpm:${PHP_SERVER}-work-0.98
+ image: devilbox/php-fpm:${PHP_SERVER}-work-0.100
hostname: php
##
@@ -135,7 +135,7 @@ services:
##
## Mail-catching
##
- - ENABLE_MAIL=2
+ - ENABLE_MAIL=${PHP_MAIL_CATCH_ALL:-2}
##
## Enable 127.0.0.1 Port-forwarding
@@ -202,6 +202,9 @@ services:
# Certificate Authority public key
- ${DEVILBOX_PATH}/ca:/ca:rw${MOUNT_OPTIONS}
+ # Users SSH directory (read-only)
+ - ${HOST_PATH_SSH_DIR}:/home/devilbox/.ssh:ro${MOUNT_OPTIONS}
+
depends_on:
- bind
@@ -245,7 +248,7 @@ services:
- MAIN_VHOST_ENABLE=${DEVILBOX_UI_ENABLE}
- MAIN_VHOST_STATUS_ENABLE=1
- MAIN_VHOST_STATUS_ALIAS=/devilbox-httpd-status
- - MAIN_VHOST_SSL_TYPE=both
+ - MAIN_VHOST_SSL_TYPE=${HTTPD_VHOST_SSL_TYPE:-both}
- MAIN_VHOST_SSL_GEN=1
- MAIN_VHOST_SSL_CN=${DEVILBOX_UI_SSL_CN:-localhost}
@@ -256,7 +259,7 @@ services:
- MASS_VHOST_TLD=.${TLD_SUFFIX}
- MASS_VHOST_DOCROOT=${HTTPD_DOCROOT_DIR}
- MASS_VHOST_TPL=${HTTPD_TEMPLATE_DIR}
- - MASS_VHOST_SSL_TYPE=both
+ - MASS_VHOST_SSL_TYPE=${HTTPD_VHOST_SSL_TYPE:-both}
- MASS_VHOST_SSL_GEN=1
##
@@ -264,7 +267,7 @@ services:
##
- COMPAT=${PHP_SERVER}
- PHP_FPM_ENABLE=1
- - PHP_FPM_SERVER_ADDR=php
+ - PHP_FPM_SERVER_ADDR=172.16.238.10
- PHP_FPM_SERVER_PORT=9000
- PHP_FPM_TIMEOUT=${HTTPD_TIMEOUT_TO_PHP_FPM:-180}
diff --git a/docs/_includes/links/tools.rst b/docs/_includes/links/tools.rst
index f526b131..d50fafed 100644
--- a/docs/_includes/links/tools.rst
+++ b/docs/_includes/links/tools.rst
@@ -183,6 +183,12 @@
PHP Code Beautifier and Fixer
+.. |ext_lnk_tool_phpmd| raw:: html
+
+
+ PHP Mess Detector
+
+
.. |ext_lnk_tool_phpunit| raw:: html
diff --git a/docs/configuration-files/env-file.rst b/docs/configuration-files/env-file.rst
index 6bd3759e..8d1c6ac4 100644
--- a/docs/configuration-files/env-file.rst
+++ b/docs/configuration-files/env-file.rst
@@ -923,6 +923,23 @@ always be ``/shared/httpd/``.
``docker-compose rm``.
+HOST_PATH_SSH_DIR
+-----------------
+
+The path on your host OS of the ssh directory to be mounted into the
+PHP container into ``/home/devilbox/.ssh``.
+
+.. note::
+ The path is mounted read-only to ensure you cannot accidentally
+ delete any ssh keys from inside the php container.
+
++------------------------------+----------------+----------------+
+| Name | Allowed values | Default value |
++==============================+================+================+
+| ``HOST_PATH_SSH_DIR`` | valid path | ``~/.ssh`` |
++------------------------------+----------------+----------------+
+
+
Docker host ports
=================
@@ -1164,6 +1181,36 @@ Example:
# Disable Xdebug, Imagick and Swoole
PHP_MODULES_DISABLE=xdebug,imagick,swoole
+PHP_MAIL_CATCH_ALL
+^^^^^^^^^^^^^^^^^^
+
+Postfix settings for email catch-all.
+
+When set to ``0`` postfix will be disabled and not started.
+
+When set to ``1`` postfix is normally started and made available. However you still need
+to configure it to your needs yourself. For that you can use the autostart scripts
+and define a couple of ``postconf -e name=value`` commands.
+
+When set to ``2`` (email catch-all) postfix is started, but no mail will leave the Devilbox. It is automatically
+internally routed the the devilbox mail account and you can see each sent mail
+in the bundled intranet: https://localhost/mail.php
+
++-------------------------+--------------------------------------+---------------------------------------------------+
+| Name | Allowed values | Default value |
++=========================+======================================+===================================================+
+| ``PHP_MAIL_CATCH_ALL`` | ``0``, ``1``, ``2`` | ``2`` |
++-------------------------+--------------------------------------+---------------------------------------------------+
+
+Example:
+
+.. code-block:: bash
+ :caption: .env
+ :emphasize-lines: 2
+
+ # Enable Postfix without email catch-all
+ PHP_MAIL_CATCH_ALL=1
+
Custom variables
^^^^^^^^^^^^^^^^
@@ -1205,6 +1252,27 @@ This will then output ``development``.
Web server
----------
+HTTPD_SSL_TYPE
+^^^^^^^^^^^^^^
+
+SSL (HTTP/HTTPS) settings for automated vhost generation.
+
+By default each project will have two vhosts (one for HTTP and one for HTTPS).
+You can control the SSL settings for your projects via the below stated values.
+
+This is internally achieved via the ``-m`` argument of |ext_lnk_project_vhost_gen|
+
+* ``both`` will serve HTTP and HTTPS for all projects
+* ``redir`` will always redirect HTTP to HTTPS
+* ``ssl`` will only serve HTTPS
+* ``plain`` will only serve HTTP
+
++-----------------------+-----------------------------------------+------------------+
+| Name | Allowed values | Default value |
++=======================+=========================================+==================+
+| ``HTTPD_SSL_TYPE`` | ``both``, ``redir``, ``ssl``, ``plain`` | ``both`` |
++-----------------------+-----------------------------------------+------------------+
+
.. _env_httpd_docroot_dir:
HTTPD_DOCROOT_DIR
diff --git a/docs/readings/available-tools.rst b/docs/readings/available-tools.rst
index 92b8ba37..be09a3e8 100644
--- a/docs/readings/available-tools.rst
+++ b/docs/readings/available-tools.rst
@@ -77,6 +77,8 @@ The PHP container is your workhorse and these are your tools:
+----------------------+---------------------------------------+
| ``phpcbf`` | |ext_lnk_tool_phpcbf| |
+----------------------+---------------------------------------+
+| ``phpmd`` | |ext_lnk_tool_phpmd| |
++----------------------+---------------------------------------+
| ``phpunit`` | |ext_lnk_tool_phpunit| |
+----------------------+---------------------------------------+
| ``photon`` | |ext_lnk_tool_photon| |
diff --git a/env-example b/env-example
index f6ff2222..5d94b128 100644
--- a/env-example
+++ b/env-example
@@ -28,9 +28,10 @@
### Show all executed commands in each
### docker image during docker-compose up?
###
-### 1: Yes
-### 0: No
-DEBUG_COMPOSE_ENTRYPOINT=1
+### 0: Quiet
+### 1: Verbose
+### 2: More verbose
+DEBUG_COMPOSE_ENTRYPOINT=2
###
@@ -441,6 +442,16 @@ MOUNT_OPTIONS=
HOST_PATH_HTTPD_DATADIR=./data/www
+###
+### The path on your host OS of the ssh directory to be mounted into the
+### PHP container into /home/devilbox/.ssh.
+###
+### IMPORTANT: The path is mounted read-only to ensure you cannot accidentally
+## delete anything inside the php container.
+###
+HOST_PATH_SSH_DIR=~/.ssh
+
+
################################################################################
###
@@ -470,6 +481,25 @@ PHP_MODULES_ENABLE=
PHP_MODULES_DISABLE=oci8,PDO_OCI,pdo_sqlsrv,sqlsrv,rdkafka,swoole
+###
+### Postfix settings for email catch-all
+###
+### When set to '1' postfix is normally started and made available. However you still need
+### to configure it to your needs yourself. For that you can use the autostart scripts
+### and define a couple of 'postconf -e name=value' commands.
+###
+### When set to '2' (email catch-all), no mail will leave the Devilbox. It is automatically
+### internally routed the the devilbox mail account and you can see each sent mail
+### in the bundled intranet: https://localhost/mail.php
+###
+### Values:
+### 0: Disable postfix (do not start it)
+### 1: Enable/Start postfix
+### 2: Enable/Start postfix and enable email catch-all
+###
+PHP_MAIL_CATCH_ALL=2
+
+
###
### Configure everything else about PHP in
### * cfg/php-ini-X.X/*.ini
@@ -490,6 +520,23 @@ HOST_PORT_HTTPD=80
HOST_PORT_HTTPD_SSL=443
+###
+### SSL (HTTP/HTTPS) settings for automated vhost generation
+###
+### By default each project will have two vhosts (one for HTTP and one for HTTPS).
+### You can control the SSL settings for your projects via the below stated values.
+###
+### This is internally achieved via the '-m' argument of https://github.com/devilbox/vhost-gen
+###
+### Values:
+### * both: Serve HTTP and HTTPS for all projects
+### * redir: HTTP always redirects to HTTPS
+### * ssl: Only serve HTTPS
+### * plain: Only serve HTTP
+###
+HTTPD_VHOST_SSL_TYPE=both
+
+
###
### Document Root Subdirectory
###
@@ -659,12 +706,14 @@ HOST_PORT_MONGO=27017
###
HOST_PORT_BIND=1053
+
###
### Add comma separated DNS server from which you want to receive DNS
### You can also add DNS servers from your LAN (if any are available)
###
BIND_DNS_RESOLVER=8.8.8.8,8.8.4.4
+
###
### Validate DNSSEC
###