diff --git a/.devilbox/www/config.php b/.devilbox/www/config.php index 81321044..59ca653f 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 = 'v3.0.0-beta-0.2'; -$DEVILBOX_DATE = '2022-12-27'; +$DEVILBOX_VERSION = 'v3.0.0-beta-0.3'; +$DEVILBOX_DATE = '2023-01-02'; $DEVILBOX_API_PAGE = 'devilbox-api/status.json'; // diff --git a/.devilbox/www/htdocs/_ajax_callback.php b/.devilbox/www/htdocs/_ajax_callback.php index c7f9ef3b..d7c6b515 100644 --- a/.devilbox/www/htdocs/_ajax_callback.php +++ b/.devilbox/www/htdocs/_ajax_callback.php @@ -150,6 +150,11 @@ if (loadClass('Helper')->isLoggedIn()) { $_GET['software'] => (($version = loadClass('Php')->getWpcliVersion()) !== false) ? $version : $no )); } + else if ($_GET['software'] == 'wscat') { + echo json_encode(array( + $_GET['software'] => (($version = loadClass('Php')->getWscatVersion()) !== false) ? $version : $no + )); + } else if ($_GET['software'] == 'yarn') { echo json_encode(array( $_GET['software'] => (($version = loadClass('Php')->getYarnVersion()) !== false) ? $version : $no diff --git a/.devilbox/www/htdocs/cnc.php b/.devilbox/www/htdocs/cnc.php index 2a78c7cf..2456479b 100644 --- a/.devilbox/www/htdocs/cnc.php +++ b/.devilbox/www/htdocs/cnc.php @@ -65,7 +65,7 @@ function run_supervisor_command($command) { ); ?>

Daemon overview


-

If you made a change to any vhost settings, you can trigger a manual reload here.

+

If you made any changes to vhost settings (vhost-gen templates or backend configuration) or to the webserver configuration itself, you can trigger a manual reload of watcherd here to apply them. No need to restart the Docker Compose stack.

diff --git a/.devilbox/www/htdocs/index.php b/.devilbox/www/htdocs/index.php index ff0f30c1..cffca806 100644 --- a/.devilbox/www/htdocs/index.php +++ b/.devilbox/www/htdocs/index.php @@ -345,7 +345,7 @@ $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL); - + @@ -428,6 +428,10 @@ $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL); + + + + @@ -970,6 +974,7 @@ $HEALTH_PERCENT = 100 - ceil(100 * $HEALTH_FAILS / $HEALTH_TOTAL); updateVersions('vue_cli'); updateVersions('webpack_cli'); updateVersions('wpcli'); + updateVersions('wscat'); updateVersions('yarn'); })(); diff --git a/.devilbox/www/htdocs/info_vhostgen.php b/.devilbox/www/htdocs/info_vhostgen.php deleted file mode 100644 index c493652c..00000000 --- a/.devilbox/www/htdocs/info_vhostgen.php +++ /dev/null @@ -1,66 +0,0 @@ - -authPage(); ?> -redirect('/vhosts.php'); -} -if (!strlen($_GET['name'])) { - loadClass('Helper')->redirect('/vhosts.php'); -} -$vhost = $_GET['name']; -$found = false; -$vhosts = loadClass('Httpd')->getVirtualHosts(); -foreach ($vhosts as $v) { - if ($vhost == $v['name']) { - $found = true; - break; - } -} -// Be safe before using outputs -$vhost = htmlentities($vhost); - -?> - - - - getHead(true); ?> - - - - getNavbar(); ?> - -
- -

vhost-gen:

-
-
- -
-
- -

The Virtual Host "" does not exist.

- - getVhostgenTemplatePath($vhost); ?> - -

No custom vhost-gen configuration found for "".

- -

Note: If the resulting virtual host config does not reflect the vhost-gen template changes, you will need to restart the Devilbox.

- Overview
-

virtual host config


- - .conf - -

vhost-gen config


-

- -
- - -
-
- -
- - getFooter(); ?> - - diff --git a/.devilbox/www/htdocs/support.php b/.devilbox/www/htdocs/support.php index a44bec37..dc609390 100644 --- a/.devilbox/www/htdocs/support.php +++ b/.devilbox/www/htdocs/support.php @@ -66,6 +66,10 @@ + + + + diff --git a/.devilbox/www/htdocs/vhosts.php b/.devilbox/www/htdocs/vhosts.php index 3a14913c..4b37386e 100644 --- a/.devilbox/www/htdocs/vhosts.php +++ b/.devilbox/www/htdocs/vhosts.php @@ -26,8 +26,8 @@ - - + + @@ -37,15 +37,82 @@ - - + + diff --git a/.devilbox/www/include/lib/container/Php.php b/.devilbox/www/include/lib/container/Php.php index ce78160c..349aad8a 100644 --- a/.devilbox/www/include/lib/container/Php.php +++ b/.devilbox/www/include/lib/container/Php.php @@ -140,6 +140,11 @@ class Php extends BaseClass implements BaseInterface $output = loadClass('Helper')->exec('wp --version 2>/dev/null | grep -i ^WP', $output); return loadClass('Helper')->egrep('/[0-9.]+/', $output); } + public function getWscatVersion() + { + $output = loadClass('Helper')->exec('wscat --version 2>/dev/null | head -1', $output); + return loadClass('Helper')->egrep('/[0-9.]+/', $output); + } public function getYarnVersion() { $output = loadClass('Helper')->exec('yarn --version 2>/dev/null', $output); diff --git a/.devilbox/www/include/vendor/Mail/mimeDecode.php b/.devilbox/www/include/vendor/Mail/mimeDecode.php index 4e2d5b6c..edb75bc8 100644 --- a/.devilbox/www/include/vendor/Mail/mimeDecode.php +++ b/.devilbox/www/include/vendor/Mail/mimeDecode.php @@ -28,8 +28,8 @@ * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * - Neither the name of the authors, nor the names of its contributors - * may be used to endorse or promote products derived from this + * - Neither the name of the authors, nor the names of its contributors + * may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" @@ -142,11 +142,11 @@ class Mail_mimeDecode extends PEAR /** * Flag to determine whether to decode headers * (set to UTF8 to iconv convert headers) - * @var mixed + * @var mixed * @access private */ var $_decode_headers; - + /** * Flag to determine whether to include attached messages @@ -182,7 +182,7 @@ class Mail_mimeDecode extends PEAR { $this->__construct($input); } - + /** * Begins the decoding process. If called statically @@ -197,7 +197,7 @@ class Mail_mimeDecode extends PEAR * of the parts. (Transfer encoding) * decode_headers - Whether to decode headers, * - use "UTF8//IGNORE" to convert charset. - * + * * input - If called statically, this will be treated * as the input * @return object Decoded results @@ -229,17 +229,17 @@ class Mail_mimeDecode extends PEAR $params['decode_headers'] : false; $this->_rfc822_bodies = isset($params['rfc_822bodies']) ? $params['rfc_822bodies'] : false; - + if (is_string($this->_decode_headers) && !function_exists('iconv')) { PEAR::raiseError('header decode conversion requested, however iconv is missing'); } - + $structure = $this->_decode($this->_header, $this->_body); if ($structure === false) { $structure = $this->raiseError($this->_error); } } - + return $structure; } @@ -320,10 +320,10 @@ class Mail_mimeDecode extends PEAR $encoding = isset($content_transfer_encoding) ? $content_transfer_encoding['value'] : '7bit'; $this->_include_bodies ? $return->body = ($this->_decode_bodies ? $this->_decodeBody($body, $encoding) : $body) : null; break; - + case 'multipart/signed': // PGP $parts = $this->_boundarySplit($body, $content_type['other']['boundary'], true); - $return->parts['msg_body'] = $parts[0]; + $return->parts['msg_body'] = $parts[0]; list($part_header, $part_body) = $this->_splitBodyHeader($parts[1]); $return->parts['sig_hdr'] = $part_header; $return->parts['sig_body'] = $part_body; @@ -404,7 +404,7 @@ class Mail_mimeDecode extends PEAR } for ($i = 0; $i < count($structure->parts); $i++) { - + if (!empty($structure->headers['content-type']) AND substr(strtolower($structure->headers['content-type']), 0, 8) == 'message/') { $prepend = $prepend . $mime_number . '.'; $_mime_number = ''; @@ -424,7 +424,7 @@ class Mail_mimeDecode extends PEAR $structure->mime_id = $prepend . $mime_number; $no_refs ? $return[$prepend . $mime_number] = '' : $return[$prepend . $mime_number] = &$structure; } - + return $return; } @@ -442,7 +442,7 @@ class Mail_mimeDecode extends PEAR if (preg_match("/^(.*?)\r?\n\r?\n(.*)/s", $input, $match)) { return array($match[1], $match[2]); } - // bug #17325 - empty bodies are allowed. - we just check that at least one line + // bug #17325 - empty bodies are allowed. - we just check that at least one line // of headers exist.. if (count(explode("\n",$input))) { return array($input, ''); @@ -466,11 +466,11 @@ class Mail_mimeDecode extends PEAR // Unfold the input $input = preg_replace("/\r?\n/", "\r\n", $input); //#7065 - wrapping.. with encoded stuff.. - probably not needed, - // wrapping space should only get removed if the trailing item on previous line is a + // wrapping space should only get removed if the trailing item on previous line is a // encoded character $input = preg_replace("/=\r\n(\t| )+/", '=', $input); $input = preg_replace("/\r\n(\t| )+/", ' ', $input); - + $headers = explode("\r\n", trim($input)); $got_start = false; foreach ($headers as $value) { @@ -485,7 +485,7 @@ class Mail_mimeDecode extends PEAR $got_start = true; } } - + $hdr_name = substr($value, 0, $pos = strpos($value, ':')); $hdr_value = substr($value, $pos+1); if($hdr_value[0] == ' ') { @@ -520,7 +520,7 @@ class Mail_mimeDecode extends PEAR * filename*0*=ENC'lang'urlencoded data. * filename*1*=ENC'lang'urlencoded data. * - * + * * * @param string Header value to parse * @return array Contains parsed result @@ -554,7 +554,7 @@ class Mail_mimeDecode extends PEAR $lq = ''; // last quote.. while ($i < $l) { - + $c = $input[$i]; //var_dump(array('i'=>$i,'c'=>$c,'q'=>$q, 'lq'=>$lq, 'key'=>$key, 'val' =>$val)); @@ -566,7 +566,7 @@ class Mail_mimeDecode extends PEAR } $escaped = true; $c = $input[$i]; - } + } // state - in key.. @@ -588,7 +588,7 @@ class Mail_mimeDecode extends PEAR $i++; continue; } - + // state - in value.. (as $val is set..) if ($q === false) { @@ -597,10 +597,10 @@ class Mail_mimeDecode extends PEAR $i++; continue; // skip leading spaces after '=' or after '"' } - - // do not de-quote 'xxx*= itesm.. + + // do not de-quote 'xxx*= itesm.. $key_is_trans = $key[strlen($key)-1] == '*'; - + if (!$key_is_trans && !$escaped && ($c == '"' || $c == "'")) { // start quoted area.. $q = $c; @@ -612,7 +612,7 @@ class Mail_mimeDecode extends PEAR } // got end.... if (!$escaped && $c == ';') { - + $return['other'][$key] = trim($val); $val = false; $key = ''; @@ -625,31 +625,31 @@ class Mail_mimeDecode extends PEAR $i++; continue; } - + // state - in quote.. if (!$escaped && $c == $q) { // potential exit state.. - + // end of quoted string.. $lq = $q; $q = false; $i++; continue; } - + // normal char inside of quoted string.. $val.= $c; $i++; } - + // do we have anything left.. if (strlen(trim($key)) || $val !== false) { - + $val = trim($val); - + $return['other'][$key] = $val; } - - + + $clean_others = array(); // merge added values. eg. *1[*] foreach($return['other'] as $key =>$val) { @@ -659,12 +659,12 @@ class Mail_mimeDecode extends PEAR $clean_others[$key] .= $val; continue; } - + } $clean_others[$key] = $val; - + } - + // handle language translation of '*' ending others. foreach( $clean_others as $key =>$val) { if ( $key[strlen($key)-1] != '*') { @@ -677,26 +677,26 @@ class Mail_mimeDecode extends PEAR // extended-other-values $match = array(); $info = preg_match("/^([^']+)'([^']*)'(.*)$/", $val, $match); - + $clean_others[$key] = urldecode($match[3]); $clean_others[strtolower($key)] = $clean_others[$key]; $clean_others[strtolower($key).'-charset'] = $match[1]; $clean_others[strtolower($key).'-language'] = $match[2]; - - + + } - - + + $return['other'] = $clean_others; - + // decode values. foreach($return['other'] as $key =>$val) { $charset = isset($return['other'][$key . '-charset']) ? $return['other'][$key . '-charset'] : false; - + $return['other'][$key] = $this->_decodeHeader($val, $charset); } - + return $return; } @@ -729,7 +729,7 @@ class Mail_mimeDecode extends PEAR $parts[] = $tmp[$i]; } } - + // add the last part on if it does not end with the 'closing indicator' if (!empty($tmp[$len]) && strlen(trim($tmp[$len])) && $tmp[$len][0] != '-') { $parts[] = $tmp[$len]; @@ -781,12 +781,12 @@ class Mail_mimeDecode extends PEAR } $input = str_replace($encoded, $text, $input); } - + if ($default_charset && is_string($this->_decode_headers)) { $conv = @iconv($charset, $this->_decode_headers, $input); $input = ($conv === false) ? $input : $conv; } - + return $input; } @@ -832,10 +832,12 @@ class Mail_mimeDecode extends PEAR // Remove soft line breaks $input = preg_replace("/=\r?\n/", '', $input); - // cytopia edit if (version_compare(PHP_VERSION, '7.2.0', '>=')) { $cb = function($matches) { - return chr(hexdec($matches[0])); + // cytopia edit (added ctype_xdigit() check around) + if (ctype_xdigit($matches[0])) { + return chr(hexdec($matches[0])); + } }; } else { // Replace encoded characters @@ -924,7 +926,7 @@ class Mail_mimeDecode extends PEAR /** * getSendArray() returns the arguments required for Mail::send() - * used to build the arguments for a mail::send() call + * used to build the arguments for a mail::send() call * * Usage: * $mailtext = Full email (for example generated by a template) @@ -966,7 +968,7 @@ class Mail_mimeDecode extends PEAR } $to = substr($to,1); return array($to,$header,$this->_body); - } + } /** * Returns a xml copy of the output of diff --git a/.tests/Makefile b/.tests/Makefile index 16d8e66e..98425be4 100644 --- a/.tests/Makefile +++ b/.tests/Makefile @@ -6,12 +6,24 @@ endif # ------------------------------------------------------------------------------------------------- # Misc Targets # ------------------------------------------------------------------------------------------------- -update-readme: +.PHONY: update-readme +update-readme: _update-readme-modules +update-readme: _update-readme-tools + +.PHONY: _update-readme-modules +_update-readme-modules: cat "../README.md" \ | perl -0 -pe "s#.*#\n$$(./scripts/get-modules.sh)\n#s" \ > "../README.md.tmp" yes | mv -f "../README.md.tmp" "../README.md" +.PHONY: _update-readme-tools +_update-readme-tools: + cat "../README.md" \ + | perl -0 -pe "s#.*#\n$$(./scripts/get-tools.sh)\n#s" \ + > "../README.md.tmp" + yes | mv -f "../README.md.tmp" "../README.md" + # ------------------------------------------------------------------------------------------------- # Linting Targets diff --git a/.tests/scripts/get-modules.sh b/.tests/scripts/get-modules.sh index 663c1d0b..4383f22a 100755 --- a/.tests/scripts/get-modules.sh +++ b/.tests/scripts/get-modules.sh @@ -94,7 +94,7 @@ MODS="$( echo "${PHP52_MODS}, ${PHP53_MODS}, ${PHP54_MODS}, ${PHP55_MODS}, ${PHP ### ### Get disabled modules ### -DISABLED=",blackfire,ioncube,phalcon,psr,$( grep -E '^PHP_MODULES_DISABLE=' "${DVLBOX_PATH}/env-example" | sed 's/.*=//g' )," +DISABLED=",blackfire,ioncube,phalcon,psr,xhprof,$( grep -E '^PHP_MODULES_DISABLE=' "${DVLBOX_PATH}/env-example" | sed 's/.*=//g' )," #echo $DISABLED B="โœ”" # Enabled base modules (cannot be disabled) E="๐Ÿ—ธ" # Enabled mods modules (can be disabled) diff --git a/.tests/scripts/get-tools.sh b/.tests/scripts/get-tools.sh new file mode 100755 index 00000000..3c53bf41 --- /dev/null +++ b/.tests/scripts/get-tools.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +# NOTE: Parsing curl to tac to circumnvent "failed writing body" +# https://stackoverflow.com/questions/16703647/why-curl-return-and-error-23-failed-writing-body + +set -e +set -u +set -o pipefail + +SCRIPT_PATH="$( cd "$(dirname "$0")" && pwd -P )" +DVLBOX_PATH="$( cd "${SCRIPT_PATH}/../.." && pwd -P )" +# shellcheck disable=SC1090 +. "${SCRIPT_PATH}/.lib.sh" + +RETRIES=10 + + +# ------------------------------------------------------------------------------------------------- +# FUNCTIONS +# ------------------------------------------------------------------------------------------------- + +PHP_TAG="$( grep 'devilbox/php' "${DVLBOX_PATH}/docker-compose.yml" | sed 's/^.*-work-//g' )" +PHP_TOOLS="$( run "curl -sS 'https://raw.githubusercontent.com/devilbox/docker-php-fpm/${PHP_TAG}/doc/available-tools.md'" "${RETRIES}" )"; + +echo "${PHP_TOOLS}" | grep -A 1000000 'TOOLS_WORK_START' diff --git a/.tests/tests/intranet-vhost.sh b/.tests/tests/intranet-vhost.sh index 41b15fc8..66c52054 100755 --- a/.tests/tests/intranet-vhost.sh +++ b/.tests/tests/intranet-vhost.sh @@ -54,7 +54,7 @@ fi HOST_PORT_HTTPD="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HOST_PORT_HTTPD" )" TLD_SUFFIX="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "TLD_SUFFIX" )" HTTPD_DOCROOT_DIR="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HTTPD_DOCROOT_DIR" )" -HTTPD_TEMPLATE_DIR="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HTTPD_TEMPLATE_DIR" )" +#HTTPD_TEMPLATE_DIR="$( "${SCRIPT_PATH}/../scripts/env-getvar.sh" "HTTPD_TEMPLATE_DIR" )" ### @@ -128,14 +128,14 @@ fi ### ### Vhost config link is available ### -printf "[TEST] vhost.d config link is available" -if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/vhosts.php' | tac | tac | grep 'vhost.d/${VHOST}.conf' >/dev/null" "${RETRIES}" "" "0"; then - printf "\\r[FAIL] vhost.d config link is available\\n" - run "curl 'http://localhost:${HOST_PORT_HTTPD}/vhosts.php' || true" - exit 1 -else - printf "\\r[OK] vhost.d config link is available\\n" -fi +#printf "[TEST] vhost.d config link is available" +#if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/vhosts.php' | tac | tac | grep 'vhost.d/${VHOST}.conf' >/dev/null" "${RETRIES}" "" "0"; then +# printf "\\r[FAIL] vhost.d config link is available\\n" +# run "curl 'http://localhost:${HOST_PORT_HTTPD}/vhosts.php' || true" +# exit 1 +#else +# printf "\\r[OK] vhost.d config link is available\\n" +#fi ### @@ -154,62 +154,62 @@ fi ### ### vhost-gen config link should appear ### -run "docker-compose exec --user devilbox -T php mkdir -p /shared/httpd/${VHOST}/${HTTPD_TEMPLATE_DIR}" "${RETRIES}" "${DVLBOX_PATH}" -run "cp ${DVLBOX_PATH}/cfg/vhost-gen/apache22.yml-example-vhost ${SCRIPT_PATH}/../www/${VHOST}/${HTTPD_TEMPLATE_DIR}/apache22.yml" "${RETRIES}" -run "cp ${DVLBOX_PATH}/cfg/vhost-gen/apache24.yml-example-vhost ${SCRIPT_PATH}/../www/${VHOST}/${HTTPD_TEMPLATE_DIR}/apache24.yml" "${RETRIES}" -run "cp ${DVLBOX_PATH}/cfg/vhost-gen/nginx.yml-example-vhost ${SCRIPT_PATH}/../www/${VHOST}/${HTTPD_TEMPLATE_DIR}/nginx.yml" "${RETRIES}" - -printf "[TEST] vhost-gen config link is available" -if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/vhosts.php' | tac | tac | grep 'info_vhostgen.php?name=${VHOST}' >/dev/null" "${RETRIES}" "" "0"; then - printf "\\r[FAIL] vhost-gen config link is available\\n" - run "curl 'http://localhost:${HOST_PORT_HTTPD}/vhosts.php' || true" - exit 1 -else - printf "\\r[OK] vhost-gen config link is available\\n" -fi +#run "docker-compose exec --user devilbox -T php mkdir -p /shared/httpd/${VHOST}/${HTTPD_TEMPLATE_DIR}" "${RETRIES}" "${DVLBOX_PATH}" +#run "cp ${DVLBOX_PATH}/cfg/vhost-gen/apache22.yml-example-vhost ${SCRIPT_PATH}/../www/${VHOST}/${HTTPD_TEMPLATE_DIR}/apache22.yml" "${RETRIES}" +#run "cp ${DVLBOX_PATH}/cfg/vhost-gen/apache24.yml-example-vhost ${SCRIPT_PATH}/../www/${VHOST}/${HTTPD_TEMPLATE_DIR}/apache24.yml" "${RETRIES}" +#run "cp ${DVLBOX_PATH}/cfg/vhost-gen/nginx.yml-example-vhost ${SCRIPT_PATH}/../www/${VHOST}/${HTTPD_TEMPLATE_DIR}/nginx.yml" "${RETRIES}" +# +#printf "[TEST] vhost-gen config link is available" +#if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/vhosts.php' | tac | tac | grep 'info_vhostgen.php?name=${VHOST}' >/dev/null" "${RETRIES}" "" "0"; then +# printf "\\r[FAIL] vhost-gen config link is available\\n" +# run "curl 'http://localhost:${HOST_PORT_HTTPD}/vhosts.php' || true" +# exit 1 +#else +# printf "\\r[OK] vhost-gen config link is available\\n" +#fi ### ### vhost-gen config should be available ### -printf "[TEST] vhost-gen config is available" -if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_vhostgen.php?name=${VHOST}' | tac | tac | grep '__VHOST_NAME__' >/dev/null" "${RETRIES}" "" "0"; then - printf "\\r[FAIL] vhost-gen config is available\\n" - run "curl 'http://localhost:${HOST_PORT_HTTPD}/info_vhostgen.php?name=${VHOST}' || true" - exit 1 -else - printf "\\r[OK] vhost-gen config is available\\n" -fi +#printf "[TEST] vhost-gen config is available" +#if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_vhostgen.php?name=${VHOST}' | tac | tac | grep '__VHOST_NAME__' >/dev/null" "${RETRIES}" "" "0"; then +# printf "\\r[FAIL] vhost-gen config is available\\n" +# run "curl 'http://localhost:${HOST_PORT_HTTPD}/info_vhostgen.php?name=${VHOST}' || true" +# exit 1 +#else +# printf "\\r[OK] vhost-gen config is available\\n" +#fi ### ### vhost-gen config changes are shown in intranet ### -replace "__INDEX__" "__MY_GREP_VALUE__" "${SCRIPT_PATH}/../www/${VHOST}/${HTTPD_TEMPLATE_DIR}/apache22.yml" -replace "__INDEX__" "__MY_GREP_VALUE__" "${SCRIPT_PATH}/../www/${VHOST}/${HTTPD_TEMPLATE_DIR}/apache24.yml" -replace "__INDEX__" "__MY_GREP_VALUE__" "${SCRIPT_PATH}/../www/${VHOST}/${HTTPD_TEMPLATE_DIR}/nginx.yml" - -printf "[TEST] vhost-gen config changes are shown" -if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_vhostgen.php?name=${VHOST}' | tac | tac | grep '__MY_GREP_VALUE__' >/dev/null" "${RETRIES}" "" "0"; then - printf "\\r[FAIL] vhost-gen config changes are shown\\n" - run "curl 'http://localhost:${HOST_PORT_HTTPD}/info_vhostgen.php?name=${VHOST}' || true" - exit 1 -else - printf "\\r[OK] vhost-gen config changes are shown\\n" -fi +#replace "__INDEX__" "__MY_GREP_VALUE__" "${SCRIPT_PATH}/../www/${VHOST}/${HTTPD_TEMPLATE_DIR}/apache22.yml" +#replace "__INDEX__" "__MY_GREP_VALUE__" "${SCRIPT_PATH}/../www/${VHOST}/${HTTPD_TEMPLATE_DIR}/apache24.yml" +#replace "__INDEX__" "__MY_GREP_VALUE__" "${SCRIPT_PATH}/../www/${VHOST}/${HTTPD_TEMPLATE_DIR}/nginx.yml" +# +#printf "[TEST] vhost-gen config changes are shown" +#if ! run "curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/info_vhostgen.php?name=${VHOST}' | tac | tac | grep '__MY_GREP_VALUE__' >/dev/null" "${RETRIES}" "" "0"; then +# printf "\\r[FAIL] vhost-gen config changes are shown\\n" +# run "curl 'http://localhost:${HOST_PORT_HTTPD}/info_vhostgen.php?name=${VHOST}' || true" +# exit 1 +#else +# printf "\\r[OK] vhost-gen config changes are shown\\n" +#fi ### ### Vhost disappears after removing its dir ### -run "docker-compose exec --user devilbox -T php rm -rf /shared/httpd/${VHOST}" "${RETRIES}" "${DVLBOX_PATH}" -run "sleep 4" - -printf "[TEST] vhost disappears after removing its dir" -if ! run "test \"\$(curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/vhosts.php' | tac | tac | grep -c '${VHOST}')\" = \"0\"" "${RETRIES}" "" "0"; then - printf "\\r[FAIL] vhost disappears after removing its dir\\n" - run "curl 'http://localhost:${HOST_PORT_HTTPD}/vhosts.php' | tac | tac | grep '${VHOST}' || true" - exit 1 -else - printf "\\r[OK] vhost disappears after removing its dir\\n" -fi +#run "docker-compose exec --user devilbox -T php rm -rf /shared/httpd/${VHOST}" "${RETRIES}" "${DVLBOX_PATH}" +#run "sleep 4" +# +#printf "[TEST] vhost disappears after removing its dir" +#if ! run "test \"\$(curl -sS --fail 'http://localhost:${HOST_PORT_HTTPD}/vhosts.php' | tac | tac | grep -c '${VHOST}')\" = \"0\"" "${RETRIES}" "" "0"; then +# printf "\\r[FAIL] vhost disappears after removing its dir\\n" +# run "curl 'http://localhost:${HOST_PORT_HTTPD}/vhosts.php' | tac | tac | grep '${VHOST}' || true" +# exit 1 +#else +# printf "\\r[OK] vhost disappears after removing its dir\\n" +#fi diff --git a/CHANGELOG.md b/CHANGELOG.md index 212b40ab..4d9d8de8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,24 @@ Make sure to have a look at [UPDATING.md](https://github.com/cytopia/devilbox/bl ## Unreleased +## Release v3.0.0-beta-0.3 (2022-01-02) + +This release provides the `dvl.to` domain to be used with `TLD_SUFFIX` (set to default), which eliminates the need to set any entries in `/etc/hosts`, as all of its subdomain will point to `127.0.0.1` via official DNS. Domain has been acquired thanks to awesome sponsors! + +### Fixed +- Intranet: mail.php fixed deprecation warnings [#798](https://github.com/cytopia/devilbox/issues/798) +- Added `host.docker.internal` to extra_hosts to be able to connect to the host system [#919](https://github.com/cytopia/devilbox/issues/919) + +### Changed +- Use `dvl.to` as default `TLD_SUFFIX` (it always poits to `127.0.0.1` removing the need to create `/etc/hosts` entries) + +### Added +- Intranet: vhost overview shows listening ports +- Intranet: vhost overview now has modals to show httpd and vhost-gen configs +- Docs: Show available tools per version in README.md +- Added `xhprof` PHP extension + + ## Release v3.0.0-beta-0.2 (2022-12-27) The Backend configuration now supports websockets as well: @@ -40,6 +58,7 @@ Once you're done with `backend.cfg` changes, head over to the Intranet C&C page ### Added - Reverse Proxy automation for websocket projects (`ws://:` or `wss::`) (Does not work with Apache 2.2) - Added tool `wscat` to be able to test websocket connections +- Intranet: show `wscat` version - Intranet: vhost overview now also shows websocket projects ### Changed diff --git a/README.md b/README.md index b4a42902..d292744e 100644 --- a/README.md +++ b/README.md @@ -4,23 +4,22 @@ ![Devilbox](docs/img/banner.png) -**[Usage](#usage)** | -**[Architecture](#architecture)** | -**[Community](#community)** | -**[Features](#feature-overview)** | -**[Intranet](#intranet-overview)** | -**[Screenshots](#screenshots)** | -**[Contributing](#contributing-)** | -**[Logos](#logos)** | -**[License](#license)** +**[Quickstart](#-quickstart)** | +**[Examples](#-examples)** | +**[Features](#star-features)** | +**[The Devilbox Stack](#-the-devilbox-stack)** | +**[Community](#-community)** | +**[Contributing](#-contributing)** | +**[Logos](#-logos)** | +**[License](#-license)** ![Devilbox](docs/_includes/figures/devilbox/devilbox-intranet-dash-all.png) [![Release](https://img.shields.io/github/release/cytopia/devilbox.svg?colorB=orange)](https://github.com/cytopia/devilbox/releases) [![Discord](https://img.shields.io/discord/1051541389256704091?color=8c9eff&label=Discord&logo=discord)](https://discord.gg/2wP3V6kBj4) [![Discourse](https://img.shields.io/discourse/https/devilbox.discourse.group/status.svg?colorB=%234CB697&label=Discourse&logo=discourse)](https://devilbox.discourse.group) -[![type](https://img.shields.io/badge/type-Docker-blue.svg)](https://www.docker.com/) [![License](https://img.shields.io/badge/license-MIT-%233DA639.svg)](https://opensource.org/licenses/MIT) + -**Available Architectures:** `amd64`, `arm64` - + -The Devilbox is a modern and highly customisable **dockerized PHP stack** supporting full **LAMP** -and **MEAN** and running on all major platforms. The main goal is to easily switch and combine -any version required for local development. It supports an **unlimited number of projects** for -which **vhosts**, **SSL certificates** and **DNS records** are created automatically. -**Reverse proxies** per project are supported to ensure listening server such as NodeJS can also be reached. -Email catch-all and popular development tools will be at your service as well. Configuration is not necessary, as everything is already pre-setup. +The Devilbox is a versatile and highly customisable zero-conf PHP Docker stack supporting LEMP and MEAN as well as Websockets, Node, Python and Golang via automated Reverse Proxy integraton. +
+
+The main goal is to provide a reproducible development environment that runs on all major platforms and is able to switch and combine any version you need. +It supports an unlimited number of projects for which vhosts, SSL certificates and DNS records are created automatically. +Email interception and popular development tools will be at your service as well. Configuration is not necessary, as everything is already pre-setup. +
+
+All created projects (frontend or backend) will be able to communicate with one another to support the emulation of a complete microservice architecture or an API landscape. +
+
+**Available Architectures:** `amd64`, `arm64`
+**Available PHP Versions:** `5.2`, `5.3`, `5.4`, `5.5`, `5.6`, `7.0`, `7.1`, `7.2`, `7.3`, `7.4`, `8.0`, `8.1`, `8.2` -Furthermore, the Devilbox provides an **identical** and **reproducible development environment** for different host operating systems. -**Requirements** + +## ๐Ÿš€ Quickstart + +
โ— System Requirements +
+The Devilbox runs on all major operating systems and its only requirement is Docker and Docker Compose:

![Linux](https://raw.githubusercontent.com/cytopia/icons/master/64x64/linux.png) ![OSX](https://raw.githubusercontent.com/cytopia/icons/master/64x64/osx.png) ![Windows](https://raw.githubusercontent.com/cytopia/icons/master/64x64/windows.png) ![Plus](https://raw.githubusercontent.com/cytopia/icons/master/64x64/plus.png) ![Docker](https://raw.githubusercontent.com/cytopia/icons/master/64x64/docker.png) +
* [Docker Engine 17.06.0+](https://docs.docker.com/compose/compose-file/compose-versioning/#version-23) * [Docker Compose 1.16.0+](https://docs.docker.com/compose/compose-file/compose-versioning/#version-23) +
-## Architecture +**Be up and running in 2 minutes.** -#### Available Stacks +
๐Ÿš€ Install and Run: Linux -The Devilbox aims to be a swiss army knife for local development by providing you all the services -you would ever need. To get an idea about the architecture behind it and to also see what's available -have a look at the following diagrams and tables. +

Linux: Install

+ +1. Download the Devilbox + ```bash + git clone https://github.com/cytopia/devilbox + ``` +2. Enter the Devilbox git directory + ```bash + cd devilbox + ``` +3. Copy the default environment file + ```bash + cp env-example .env + ``` + +

Linux: Run

+ +> :warning: Important: Ensure that nothing is listening on port 80 and 443 on your host system. These ports are required by the Devilbox webserver. + +
+ +1. Start `httpd`, `php` and `mysql` container + ```bash + # This step may take a few minutes as required + # Docker images have to be pulled initially. + + # Inside the Devilbox git directory + docker-compose up httpd php mysql + ``` +2. Visit http://localhost in your browser + +
+
+ + +
๐Ÿš€ Install and Run: MacOS + +

MacOS: Install

+ +1. Download the Devilbox + ```bash + git clone https://github.com/cytopia/devilbox + ``` +2. Enter the Devilbox git directory + ```bash + cd devilbox + ``` +3. Copy the default environment file + ```bash + cp env-example .env + ``` + +

MacOS: Run

+ +> :warning: Important: Ensure that nothing is listening on port 80 and 443 on your host system. These ports are required by the Devilbox webserver. + +
+ +1. Start `httpd`, `php` and `mysql` container + ```bash + # This step may take a few minutes as required + # Docker images have to be pulled initially. + + # Inside the Devilbox git directory + docker-compose up httpd php mysql + ``` +2. Visit http://localhost in your browser + +
+
+ + +
๐Ÿš€ Install and Run: Windows +
+Note: If you are using WSL2, refer to the Linux guide instead. +
+ +

Windows: Install

+ +1. Clone https://github.com/cytopia/devilbox to C:\devilbox with Git for Windows +2. Copy C:\devilbox\env-example to C:\devilbox\.env + + +

Windows: Run

+ +> :warning: Important: Ensure that nothing is listening on port 80 and 443 on your host system. These ports are required by the Devilbox webserver. + +Open a terminal on Windows and start `httpd`, `php` and `mysql` container: +
+ +1. Start `httpd`, `php` and `mysql` container + ```bash + # This step may take a few minutes as required + # Docker images have to be pulled initially. + + # Inside the Devilbox git directory + docker-compose up httpd php mysql + ``` +2. Visit http://localhost in your browser + +
+
+ + +
๐Ÿ’ป Enter the work container +

Enter the work container

+ +The Devilbox allows you to work on your projects on the host system as well as inside the work container. Your project files will be available at both locations. The workflow ususally is: + +1. Use your prefered IDE (e.g. PhpStorm) on your host system to add and alter files +2. Work inside the container to run common cli tools such as `node`, `composer`, `npm`, `phpcs`, `webpack` and many more. + +To enter the work container, simply run `./shell.sh` + +1. On Linux, MacOS and Windows with WSL2 + ```bash + # Inside the Devilbox git directory + ./shell.sh + ``` +2. On Windows without WSL2 + ```bash + # Inside the Devilbox git directory + ./shell.bat + ``` + +
+ + + +## ๐Ÿ’ก Examples + +**Create your first project:** + +
Example: Dummy Project + +1. Start the container you need: + ```bash + docker-compose up httpd php mysql + ``` +2. Enter the work container: + ```bash + ./shell.sh + ``` +3. Navigate to `/shared/httpd`: + ```bash + cd /shared/httpd + ``` +4. Create your project directory + ```bash + mkdir dummy-project + ``` +5. Visit http://localhost/vhosts.php
+ You will notice that you need to create a `htdocs/` directory
+ +6. Create `htdocs/` directory + ```bash + # Navigate to your project directory + cd /shared/httpd/dummy-project + + # Create htdocs dir + mkdir htdocs + ``` +7. Visit http://localhost/vhosts.php
+ You will see that everything is now setup and your project is created and available
+ +8. Create an `index.php` file + ```bash + # Navigate to your project htdocs directory + cd /shared/httpd/dummy-project/htdocs + + # Create a simple index.php file + echo ' index.php + ``` +9. View your project in the browser: http://dummy-project.dvl.to + +
+
+ + +
Example: PHP Framework + +Find all the examples in the documentation: + +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +
+ + + +## :star: Features + +The Devilbox tries to be a zero-configuration stack out of the box and has automated all the boring tasks. Additionally it provides common feature required for everyday work. + +
Angular CliAngular Cli
Wordpress Cli
Wscat
Yarn docker-php-fpm-8.2 PHP 8.2 base images (amd64 and arm64)
docker-php-fpm-8.3PHP 8.3 base images (amd64 and arm64)
docker-php-fpm PHP-FPM Devilbox images (amd64 and arm64)DocumentRoot Backend ConfigValidURLValidURL
getEnv('HOST_PATH_HTTPD_DATADIR');?>//getEnv('HTTPD_DOCROOT_DIR');?> getVhostBackend($vHost['name']); ?> - - getVhostgenTemplatePath($vHost['name'])) !== false): ?> - - - + + + + + + + + getVhostgenTemplatePath($vHost['name'])) !== false): ?> + + + +
+ + + + + + + + + + + + +
+ Automation
+ :star: Automated Project creation
+ :star: Automated SSL
+ :star: Automated DNS
+ :star: Host permission sync
+
+ Modes
+ :star: Static files
+ :star: PHP files
+ :star: Reverse Proxy
+ :star: Websockets
+
+ Backends
+ :star: PHP-FPM
+ :star: NodeJS
+ :star: Python
+ :star: Golang
+ :star: ...
+
+ Profiling
+ :star: Blackfire
+ :star: Xdebug
+ :star: XHProf
+
+ Projects
+ :star: Unlimited Projects
+ :star: Inter-Project Communication
+ :star: Custom Project domains
+ :star: Valid browser HTTPS
+
+ Intranet
+ :star: Virtual Hosts
+ :star: C&C
+ :star: Email Reader
+ :star: OpCache Gui
+
+ Batteries
+ :star: Adminer
+ :star: phpMyAdmin
+ :star: phpPgAdmin
+ :star: phpRedMind
+
+ Services
+ :star: SQL
+ :star: NoSQL
+ :star: Cache
+ :star: ...
+
+ + +

The Devilbox Stack The Devilbox Stack

+ +The Devilbox aims to be a swiss army knife for local development by providing you all the services you would ever need. To get an idea about the architecture behind it and to also see what's available have a look at its components and usage. @@ -87,9 +373,79 @@ have a look at the following diagrams and tables.
-> [Devilbox artwork](https://github.com/devilbox/artwork) -#### Available Container + +
๐Ÿ’ป Modes of operation + +

Modes of operation

+ +You can startup and operate the Devilbox in three different ways via `docker-compose`: + +1. Selective startup +2. On Demand (add/remove container while running) +3. Full startup + +#### Selective startup + +If you already know what kind of container you need before starting the Devilbox, you can just specify them explicitly. + +```bash +# Inside the Devilbox git directory start httpd php mysql and redis +docker-compose up httpd php mysql redis +``` + +The Intranet will show you what container you have currently running: + +![Devilbox](docs/img/devilbox-dash-selective.png) + + +#### On Demand + +If the Devilbox is already started you can attach more container on-the-fly, + +```bash +# Inside the Devilbox git directory attach mongo and memcached +docker-compose up mongo memcd +``` + +You can also shut down specific containers that you do not need + +```bash +# Inside the Devilbox git directory shutdown redis +docker-compose stop redis +``` + +#### Full startup + +If you just want to start everything, run `docker-compose up` without any arguments + +```bash +# Inside the Devilbox git directory start them all +docker-compose up +``` + +The Intranet will show you what container you have currently running: + +![Devilbox](docs/_includes/figures/devilbox/devilbox-intranet-dash-all.png) + +If you prefer a visual guide, have a look at the two introduction videos on Youtube: +
+
+ + + +> **Documentation:** +> [Install the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/install-the-devilbox.html) | +> [Start the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html) | +> [.env file](https://devilbox.readthedocs.io/en/latest/configuration-files/env-file.html) + +
+
+ + +
๐Ÿ‹ Available Container + +

Available Container

The following table lists all integrated and pre-configured Docker container shipped by the Devilbox. Only the webserver and PHP container are mandatory, all others are optional and don't need to be started. @@ -103,117 +459,23 @@ Each of them is also available in multiple different versions in order to reflec | | | | PerconaDB | Redis | | Kibana | MailHog | | | | | PostgreSQL | | | | Ngrok | +
+ > **Documentation:** > [Available Container](https://devilbox.readthedocs.io/en/latest/readings/available-container.html) -## Community +
+
-The Devilbox has a lot of features reaching from a simple single-user development environment that -works out of the box up to a shared development infrastructure for a corporate network. -In order to be aware about all that features, ensure to have skimmed over the -**[documentation](https://devilbox.readthedocs.io)**, so you know what can be done and how that might -simplify your every-day life. If you ever run into any unforseen issues, feel free to join the -**[Discord chat](https://discord.gg/2wP3V6kBj4)** or visit the **[forums](https://devilbox.discourse.group)** and get community support quickly. +
๐Ÿ“Œ Version Matrix - - - - - - - - - - - - - - - - - - - - - - - -

๐Ÿ“˜ Docs

๐ŸŽฎ Discord

๐Ÿ—ช Forum

๐Ÿ”ฅ Flames

- - - - - - - - - - - - - - - -
devilbox.readthedocs.iodiscord/devilboxdevilbox.discourse.groupgithub.com/devilbox/flames
- -## Usage - -#### Quick start - - - - - - - - - - - - - - -
Linux and MacOSWindows
-
# Get the Devilbox
-git clone https://github.com/cytopia/devilbox
-
# Create docker-compose environment file
-cd devilbox
-cp env-example .env
-
# Edit your configuration
-vim .env
-
# Start all container
-docker-compose up
-
- 1. Clone https://github.com/cytopia/devilbox to C:\devilbox with Git for Windows

- 2. Copy C:\devilbox\env-example to C:\devilbox\.env

- 3. Edit C:\devilbox\.env

- 4. Open a terminal on Windows and type:


-
# Start all container
-C:\devilbox> docker-compose up
-
- -> **Documentation:** -> [Install the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/install-the-devilbox.html) | -> [Start the Devilbox](https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html) | -> [.env file](https://devilbox.readthedocs.io/en/latest/configuration-files/env-file.html) - -#### Selective start - -The above will start all containers, you can however also just start the containers you actually need. This is achieved by simply specifying them in the docker-compose command. - -```bash -docker-compose up httpd php mysql redis -``` -> **Documentation:** -> [Start only some container](https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html#start-some-container) - -![Devilbox](docs/img/devilbox-dash-selective.png) - -#### Run different versions +

Version Matrix

Every single attachable container comes with many different versions. In order to select the desired version for a container, simply edit the `.env` file and uncomment the version of choice. Any combination is possible. +#### Run different versions + @@ -389,6 +651,7 @@ Every single attachable container comes with many different versions. In order t
+
[1] PHP 5.2 is available to use, but it is not officially supported. The Devilbox intranet does not work with this version as PHP 5.2 does not support namespaces. Furthermore PHP 5.2 does only work with Apache 2.4, Nginx stable and Nginx mainline. It does not work with Apache 2.2. Use at your own risk. @@ -462,263 +725,18 @@ Additionally to the default stack, there are a variety of other services that ca +
+ > **Documentation:** > [Enable custom container](https://devilbox.readthedocs.io/en/latest/custom-container/enable-all-container.html) -#### Enter the container +
+
-You can also work directly inside the php container. Simply use the bundled scripts `shell.sh` (or `shell.bat` for Windows). -The `PS1` will automatically be populated with current chosen php version. -Navigate the the Devilbox directory and type the below listed command: - - - - - - - - - - - - - -
Linux and MacOSWindows
-
host> ./shell.sh
-devilbox@php-7.0.19 in /shared/httpd $
-
-
C:\devilbox> shell.bat
-devilbox@php-7.0.19 in /shared/httpd $
-
+
โš™๏ธ Available PHP Extensions -Your projects can be found in `/shared/httpd`. DNS records are automatically available inside the php container. Also every other service will be available on `127.0.0.1` inside the php container (tricky socat port-forwarding). - -> **Documentation:** -> [Work inside the PHP container](https://devilbox.readthedocs.io/en/latest/intermediate/work-inside-the-php-container.html) | -> [Directory overview](https://devilbox.readthedocs.io/en/latest/getting-started/directory-overview.html) - -#### Quick Video intro - -[![Devilbox setup and workflow](docs/img/devilbox_01-setup-and-workflow.png "devilbox - setup and workflow")](https://www.youtube.com/watch?v=reyZMyt2Zzo) -[![Devilbox email catch-all](docs/img/devilbox_02-email-catch-all.png "devilbox - email catch-all")](https://www.youtube.com/watch?v=e-U-C5WhxGY) - -## Feature overview - -The Devilbox has everything setup for you. The only thing you will have to install is [Docker](https://docs.docker.com/engine/installation/) and [Docker Compose](https://docs.docker.com/compose/install/). Virtual hosts and DNS entries will be created automatically, just by adding new project folders. - -> **Documentation:** -> [Devilbox Prerequisites](https://devilbox.readthedocs.io/en/latest/getting-started/prerequisites.html) - -#### Features - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
:star: HTTPS supportHTTPS is available by default for all projects and the bundled Intranet.
:star: HTTP/2 supportAll HTTPS connections will offer HTTP/2 as the default protocol, except for Apache 2.2 which does not support it.
:star: Auto virtual hostsNew virtual hosts are created automatically and instantly whenever you add a project directory. This is done internally via vhost-gen and watcherd.
:star: Automated SSL certsValid SSL certificates for HTTPS are automatically created for each vhost and signed by the Devilbox CA.
:star: Unlimited vhostsRun as many projects as you need with a single instance of the Devilbox.
:star: Custom vhostsYou can overwrite and customise the default applied vhost configuration for every single vhost.
:star: Reverse proxyHave your NodeJS application served with a nice domain name and valid HTTPS.
:star: Custom domainsChoose whatever development domain you desire: *.loc, *.dev or use real domains as well: *.example.com
:star: Auto DNSAn integrated BIND server is able to create DNS entries automatically for your chosen domains.
:star: Auto start scriptsCustom startup scripts can be provided for all PHP container equally and also differently per PHP version to install custom software or automatically startup up your required tools.
:star: Custom PHP configOverwrite any setting for PHP.
:star: Email catch-allAll outgoing emails are catched and will be presented in the included intranet.
:star: Self-validationProjects and configuration options are validated and marked in the intranet.
:star: XdebugXdebug and a full blown PHP-FPM server is ready to serve.
:star: Devilbox FlamesDevilbox community plugins a.k.a. Devilbox Flames.
:star: Many moreSee Documentation for all available features.
- -> **Documentation:** -> [Setup Auto DNS](https://devilbox.readthedocs.io/en/latest/intermediate/setup-auto-dns.html) | -> [Setup valid HTTPS](https://devilbox.readthedocs.io/en/latest/intermediate/setup-valid-https.html) | -> [Configure Xdebug](https://devilbox.readthedocs.io/en/latest/intermediate/configure-php-xdebug.html) | -> [Customize PHP](https://devilbox.readthedocs.io/en/latest/advanced/customize-php-globally.html) - -#### Batteries - -The following batteries are available in the Devilbox intranet by default: - - - - - - - - - - - - - - - - - - - - - - -
AdminerphpMyAdminphpPgAdminphpRedMinPHPMemcachedAdminOpCacheGUIMail viewer
AdminerphpMyAdminphpPgAdminphpRedMinPHP Memcached AdminOpCache GUIMail viewer
- -> **Documentation:** -> [Devilbox Intranet](https://devilbox.readthedocs.io/en/latest/getting-started/devilbox-intranet.html) - -#### Tools - -The following tools will assist you on creating new projects easily as well as helping you check your code against guidelines. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
:wrench: awesome-ciA set of tools for static code analysis:

file-cr, file-crlf, file-empty, file-nullbyte-char, file-trailing-newline, file-trailing-single-newline, file-trailing-space, file-utf8, file-utf8-bom, git-conflicts, git-ignored, inline-css, inline-js, regex-grep, regex-perl, syntax-bash, syntax-css, syntax-js, syntax-json, syntax-markdown, syntax-perl, syntax-php, syntax-python, syntax-ruby, syntax-scss, syntax-sh
:wrench: git flowgit-flow is a Git extensions to provide high-level repository operations for Vincent Driessen's branching model.
:wrench: json lintjsonlint is a command line linter for JSON files.
:wrench: laravel installerlaravel is a command line tool that lets you easily install the Laravel framework.
:wrench: linkchecklinkcheck is a command line tool that searches for URLs in files (optionally limited by extension) and validates their HTTP status code.
:wrench: markdownlintmarkdownlint is a markdown linter.
:wrench: mdlmdl is a markdown linter.
:wrench: phalcon devtoolsphalcon is a command line tool that lets you easily install the PhalconPHP framework.
:wrench: photon installerphoton is a command line tool that lets you easily install the PhotonCMS.
:wrench: php code snifferphpcs is a command line tool that tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.
:wrench: php code beautifierphpcbf is a command line tool that automatically correct coding standard violations.
:wrench: php cs fixerphp-cs-fixer is a tool to automatically fix PHP Coding Standards issues.
:wrench: pm2pm2 is Node.js Production Process Manager with a built-in Load Balancer.
:wrench: stylelintstylelint is a css/scss linter.
:wrench: symfony installersymfony is a command line tool that lets you easily install the Symfony framework.
:wrench: tigtig is a text-mode interface for git.
:wrench: wp-cliwp is a command line tool that lets you easily install WordPress.
:wrench: yamllintyamllint is a linter for yaml files.
- -Well-known and popular tools will be at your service as well: - -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox - -> **Documentation:** -> [Available Tools](https://devilbox.readthedocs.io/en/latest/readings/available-tools.html) - -#### Available PHP Modules +

Available PHP Extensions

The Devilbox is a development stack, so it is made sure that a lot of PHP modules are available out of the box in order to work with many different frameworks. @@ -726,6 +744,8 @@ The Devilbox is a development stack, so it is made sure that a lot of PHP module > * Enabled (can be disabled): ๐Ÿ—ธ > * Available, but disabled (can be enabled): **d** +
+ | Modules | PHP 5.2 | PHP 5.3 | PHP 5.4 | PHP 5.5 | PHP 5.6 | PHP 7.0 | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 | PHP 8.0 | PHP 8.1 | PHP 8.2 | |-------------------------------|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:|:-------:| @@ -825,6 +845,7 @@ The Devilbox is a development stack, so it is made sure that a lot of PHP module | vips | | | | | | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | | | wddx | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | | | | | | Xdebug | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | +| xhprof | | | | | | d | d | d | d | d | d | d | d | | xlswriter | | | | | | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | | xml | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | | xmlreader | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | โœ” | @@ -837,37 +858,187 @@ The Devilbox is a development stack, so it is made sure that a lot of PHP module | zstd | | | | | | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | ๐Ÿ—ธ | +
+ > * Core enabled (cannot be disabled): **โœ”** > * Enabled (can be disabled): ๐Ÿ—ธ > * Available, but disabled (can be enabled): **d** +
PHP modules can be enabled or disabled on demand to reflect the state of your target environment. > **Documentation:** > [Enable/disable PHP modules](https://devilbox.readthedocs.io/en/latest/intermediate/enable-disable-php-modules.html) -#### Supported PHP Frameworks +
+
+ + +
๐Ÿ› ๏ธ Available CLI Tools + +

Available Tools

+ +Well-known and popular tools will be at your service: + +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox + + + + +| Tool | PHP 5.2 | PHP 5.3 | PHP 5.4 | PHP 5.5 | PHP 5.6 | PHP 7.0 | PHP 7.1 | PHP 7.2 | PHP 7.3 | PHP 7.4 | PHP 8.0 | PHP 8.1 | PHP 8.2 | +|--------------------------------------------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------|---------| +| [angular-cli][lnk_angular-cli] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [asgardcms][lnk_asgardcms] | | | | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [awesome-ci][lnk_awesome-ci] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [codeception][lnk_codeception] | | | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [**composer**][lnk_**composer**] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [**corepack**][lnk_**corepack**] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [deployer][lnk_deployer] | | | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [eslint][lnk_eslint] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [git][lnk_git] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [git-flow][lnk_git-flow] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [grunt-cli][lnk_grunt-cli] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [gulp][lnk_gulp] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [jq][lnk_jq] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [jsonlint][lnk_jsonlint] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [laravel-installer][lnk_laravel-installer] | | | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [laravel-lumen][lnk_laravel-lumen] | | | | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [linkcheck][lnk_linkcheck] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [mdl][lnk_mdl] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [mdlint][lnk_mdlint] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [mupdf-tools][lnk_mupdf-tools] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [net-tools][lnk_net-tools] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [**node**][lnk_**node**] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [**npm**][lnk_**npm**] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [**nvm**][lnk_**nvm**] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [phalcon-devtools][lnk_phalcon-devtools] | | | | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | | +| [php-cs-fixer][lnk_php-cs-fixer] | | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | | +| [phpcbf][lnk_phpcbf] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [phpcs][lnk_phpcs] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [phpmd][lnk_phpmd] | | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [phpunit][lnk_phpunit] | | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [**pip**][lnk_**pip**] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [pm2][lnk_pm2] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [pwncat][lnk_pwncat] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [rsync][lnk_rsync] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [sass][lnk_sass] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [shellcheck][lnk_shellcheck] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [ssh][lnk_ssh] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [stylelint][lnk_stylelint] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [svn][lnk_svn] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [symfony-cli][lnk_symfony-cli] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [taskfile][lnk_taskfile] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [tig][lnk_tig] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [vim][lnk_vim] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [vue-cli][lnk_vue-cli] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [webpack-cli][lnk_webpack-cli] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [wkhtmltopdf][lnk_wkhtmltopdf] | | | | | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [wp-cli][lnk_wp-cli] | | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [wscat][lnk_wscat] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [yamllint][lnk_yamllint] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [**yarn**][lnk_**yarn**] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [yq][lnk_yq] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | +| [zsh][lnk_zsh] | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | โœ“ | + +[lnk_angular-cli]: ../php_tools/angular-cli +[lnk_asgardcms]: ../php_tools/asgardcms +[lnk_awesome-ci]: ../php_tools/awesome-ci +[lnk_codeception]: ../php_tools/codeception +[lnk_**composer**]: https://getcomposer.org/ +[lnk_**corepack**]: https://nodejs.org/api/corepack.html +[lnk_deployer]: ../php_tools/deployer +[lnk_eslint]: ../php_tools/eslint +[lnk_git]: ../php_tools/git +[lnk_git-flow]: ../php_tools/git-flow +[lnk_grunt-cli]: ../php_tools/grunt-cli +[lnk_gulp]: ../php_tools/gulp +[lnk_jq]: ../php_tools/jq +[lnk_jsonlint]: ../php_tools/jsonlint +[lnk_laravel-installer]: ../php_tools/laravel-installer +[lnk_laravel-lumen]: ../php_tools/laravel-lumen +[lnk_linkcheck]: ../php_tools/linkcheck +[lnk_mdl]: ../php_tools/mdl +[lnk_mdlint]: ../php_tools/mdlint +[lnk_mupdf-tools]: ../php_tools/mupdf-tools +[lnk_net-tools]: ../php_tools/net-tools +[lnk_**node**]: https://nodejs.org/en/ +[lnk_**npm**]: https://nodejs.org/en/knowledge/getting-started/npm/what-is-npm/ +[lnk_**nvm**]: https://github.com/nvm-sh/nvm +[lnk_phalcon-devtools]: ../php_tools/phalcon-devtools +[lnk_php-cs-fixer]: ../php_tools/php-cs-fixer +[lnk_phpcbf]: ../php_tools/phpcbf +[lnk_phpcs]: ../php_tools/phpcs +[lnk_phpmd]: ../php_tools/phpmd +[lnk_phpunit]: ../php_tools/phpunit +[lnk_**pip**]: https://pypi.org/ +[lnk_pm2]: ../php_tools/pm2 +[lnk_pwncat]: ../php_tools/pwncat +[lnk_rsync]: ../php_tools/rsync +[lnk_sass]: ../php_tools/sass +[lnk_shellcheck]: ../php_tools/shellcheck +[lnk_ssh]: ../php_tools/ssh +[lnk_stylelint]: ../php_tools/stylelint +[lnk_svn]: ../php_tools/svn +[lnk_symfony-cli]: ../php_tools/symfony-cli +[lnk_taskfile]: ../php_tools/taskfile +[lnk_tig]: ../php_tools/tig +[lnk_vim]: ../php_tools/vim +[lnk_vue-cli]: ../php_tools/vue-cli +[lnk_webpack-cli]: ../php_tools/webpack-cli +[lnk_wkhtmltopdf]: ../php_tools/wkhtmltopdf +[lnk_wp-cli]: ../php_tools/wp-cli +[lnk_wscat]: ../php_tools/wscat +[lnk_yamllint]: ../php_tools/yamllint +[lnk_**yarn**]: https://yarnpkg.com/cli/install +[lnk_yq]: ../php_tools/yq +[lnk_zsh]: ../php_tools/zsh + + + + +
+
+ + +
๐Ÿ”Œ Supported Frameworks + +

Supported Frameworks

+ +#### PHP Frameworks As far as tested there are no limitations and you can use any Framework or CMS just as you would on your live environment. Below are a few examples of extensively tested Frameworks and CMS: -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox -Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox +Devilbox > **Documentation:**
> [Setup CakePHP](https://devilbox.readthedocs.io/en/latest/examples/setup-cakephp.html) | @@ -889,40 +1060,76 @@ As far as tested there are no limitations and you can use any Framework or CMS j > [Setup Yii](https://devilbox.readthedocs.io/en/latest/examples/setup-yii.html) | > [Setup Zend](https://devilbox.readthedocs.io/en/latest/examples/setup-zend.html) -#### Supported reverse proxied applications +#### Reverse Proxy Applications As far as tested there are no limitations and you can use any application that creates an open port. These ports will be reverse proxied by the web server and even allow you to use **valid HTTPS** for them. By the built-in **autostart feature** of the Devilbox you can ensure that your application automatically starts up as soon as you run `docker-compose up`. -NodeJS -Python Flask -Sphinx +NodeJS +Python Flask +Sphinx > **Documentation:**
> [Setup reverse proxy NodeJs](https://devilbox.readthedocs.io/en/latest/examples/setup-reverse-proxy-nodejs.html) | > [Setup reverse proxy Sphinx documentation](https://devilbox.readthedocs.io/en/latest/examples/setup-reverse-proxy-sphinx-docs.html) -## Intranet overview +
+
+ + +
๐ŸŒ Devilbox Intranet + +

Devilbox Intranet

The Devilbox comes with a pre-configured intranet on `http://localhost` and `https://localhost`. This can be explicitly disabled or password-protected. The intranet will not only show you, the chosen configuration, but also validate the status of the current configuration, such as if **DNS records** exists (on host and container), are directories properly set-up. Additionally it provides external tools to let you interact with databases and emails. * **Virtual Host overview** (validates directories and DNS) -* **Database overview** (MySQL, PgSQL, Redis, Memcache, ...) +* **Command & Control** * **Email overview** +* **Database overview** (MySQL, PgSQL, Redis, Memcache, ...) * **Info pages** (Httpd, MySQL, PgSQL, Redis, Memcache, ...) -* **[Adminer](https://www.adminer.org)** -* **[phpMyAdmin](https://www.phpmyadmin.net)** -* **[phpPgAdmin](http://phppgadmin.sourceforge.net)** -* **[phpRedMin](https://github.com/sasanrose/phpredmin)** -* **[PHPMemcachedAdmin](https://github.com/elijaa/phpmemcachedadmin)** -* **[OpcacheGUI](https://github.com/PeeHaa/OpCacheGUI)** +* And many more... + +
+ +The following batteries are available in the Devilbox intranet by default: + + + + + + + + + + + + + + + + + + + + + + +
AdminerphpMyAdminphpPgAdminphpRedMinPHPMemcachedAdminOpCacheGUIMail viewer
AdminerphpMyAdminphpPgAdminphpRedMinPHP Memcached AdminOpCache GUIMail viewer
+
> **Documentation:** > [Devilbox Intranet](https://devilbox.readthedocs.io/en/latest/getting-started/devilbox-intranet.html) -## Screenshots +
+
+ + +
๐Ÿ“ธ Screenshots + +

Screenshots

A few examples of how the built-in intranet looks like. @@ -930,56 +1137,119 @@ A few examples of how the built-in intranet looks like. - + Intranet: Home - + Intranet: Vhost - + Intranet: Database - + Intranet: Emails + -## Contributing [![Open Source Helpers](https://www.codetriage.com/cytopia/devilbox/badges/users.svg)](https://www.codetriage.com/cytopia/devilbox) +
+
-The Devilbox is still a young project with a long roadmap of features to come. Features are -decided by you - **the community**, so any kind of contribution is welcome. -[![](https://sourcerer.io/fame/cytopia/cytopia/devilbox/images/0)](https://sourcerer.io/fame/cytopia/cytopia/devilbox/links/0) -[![](https://sourcerer.io/fame/cytopia/cytopia/devilbox/images/1)](https://sourcerer.io/fame/cytopia/cytopia/devilbox/links/1) -[![](https://sourcerer.io/fame/cytopia/cytopia/devilbox/images/2)](https://sourcerer.io/fame/cytopia/cytopia/devilbox/links/2) -[![](https://sourcerer.io/fame/cytopia/cytopia/devilbox/images/3)](https://sourcerer.io/fame/cytopia/cytopia/devilbox/links/3) -[![](https://sourcerer.io/fame/cytopia/cytopia/devilbox/images/4)](https://sourcerer.io/fame/cytopia/cytopia/devilbox/links/4) -[![](https://sourcerer.io/fame/cytopia/cytopia/devilbox/images/5)](https://sourcerer.io/fame/cytopia/cytopia/devilbox/links/5) -[![](https://sourcerer.io/fame/cytopia/cytopia/devilbox/images/6)](https://sourcerer.io/fame/cytopia/cytopia/devilbox/links/6) -[![](https://sourcerer.io/fame/cytopia/cytopia/devilbox/images/7)](https://sourcerer.io/fame/cytopia/cytopia/devilbox/links/7) -To increase visibility and bug-free operation: +## ๐Ÿ‘ซ Community + +The Devilbox has a lot of features reaching from a simple single-user development environment that +works out of the box up to a shared development infrastructure for a corporate network. + +In order to be aware about all that features, ensure to have skimmed over the +**[documentation](https://devilbox.readthedocs.io)**, so you know what can be done and how that might +simplify your every-day life. If you ever run into any unforseen issues, feel free to join the +**[Discord chat](https://discord.gg/2wP3V6kBj4)** or visit the **[forums](https://devilbox.discourse.group)** and get community support quickly. + + + + + + + + + + + + + + + + + + + + + + + + +

๐Ÿ“˜ Docs

๐ŸŽฎ Discord

๐Ÿ—ช Forum

๐Ÿ”ฅ Flames

+ + + + + + + + + + + + + + + +
devilbox.readthedocs.iodiscord/devilboxdevilbox.discourse.groupgithub.com/devilbox/flames
+ + + +## ๐Ÿค Contributing + +The Devilbox is still a young project with a long roadmap ahead. Features are decided by you - **the community**, so any kind of contribution is welcome. * Star this project * Open up issues for bugs and feature requests * Clone this project and submit fixes or features -* Visit the [Devilbox Discord Chat](https://discord.gg/2wP3V6kBj4) to exchange about setups -* Visit the [Devilbox Community Forums](https://devilbox.discourse.group) for announcements and to help others -Additionally you can [subscribe to Devilbox on CodeTriage](https://www.codetriage.com/cytopia/devilbox), -read up on [CONTRIBUTING.md](CONTRIBUTING.md) and check the [ROADMAP](https://github.com/cytopia/devilbox/issues/23) about what is already planned for the near future. -## Logos + +## ๐Ÿง˜ Maintainer + +I try to keep up with literally over 100 projects. +If my work is making your life easier, consider sending coffee or beer. ๐Ÿ–ค + +* [GitHub Sponsorship](https://github.com/sponsors/cytopia) +* [Patreon](https://www.patreon.com/devilbox) + +**Contributions:** PyPI: [cytopia](https://pypi.org/user/cytopia/) **ยท** +Terraform: [cytopia](https://registry.terraform.io/namespaces/cytopia) **ยท** +Ansible: [cytopia](https://galaxy.ansible.com/cytopia) + + + +## ๐ŸŒ€ Logos Logos and banners can be found at **[devilbox/artwork](https://github.com/devilbox/artwork)**. Feel free to use or modify them by the terms of their license. -## License +## ๐Ÿ—Ž License **[MIT License](LICENSE.md)** Copyright (c) 2016 **[cytopia](https://github.com/cytopia)** + + + + + diff --git a/cfg/vhost-gen/apache22.yml-example-rproxy b/cfg/vhost-gen/apache22.yml-example-rproxy index 345f77a8..c947b096 100644 --- a/cfg/vhost-gen/apache22.yml-example-rproxy +++ b/cfg/vhost-gen/apache22.yml-example-rproxy @@ -134,13 +134,16 @@ features: Allow from all + # https://stackoverflow.com/a/42558499 + # https://fetch.spec.whatwg.org/#forbidden-header-name xdomain_request: | # Allow cross domain request from these hosts SetEnvIf Origin "__REGEX__" AccessControlAllowOrigin=$0 - Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin - Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" + Header always set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin + Header always set Access-Control-Allow-Methods "HEAD, GET, POST, PUT, PATCH, DELETE, OPTIONS" + Header always set Access-Control-Allow-Headers "Accept, Authorization, Content-Security-Policy, Content-Type, Location, Origin, X-Requested-With" + Header always set Access-Control-Expose-Headers "Content-Security-Policy, Location" Header always set Access-Control-Max-Age "0" - Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token" # Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request. RewriteEngine On RewriteCond %{REQUEST_METHOD} OPTIONS diff --git a/cfg/vhost-gen/apache22.yml-example-vhost b/cfg/vhost-gen/apache22.yml-example-vhost index 2ed7c9a4..ca65395c 100644 --- a/cfg/vhost-gen/apache22.yml-example-vhost +++ b/cfg/vhost-gen/apache22.yml-example-vhost @@ -181,13 +181,16 @@ features: Allow from all + # https://stackoverflow.com/a/42558499 + # https://fetch.spec.whatwg.org/#forbidden-header-name xdomain_request: | # Allow cross domain request from these hosts SetEnvIf Origin "__REGEX__" AccessControlAllowOrigin=$0 - Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin - Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" + Header always set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin + Header always set Access-Control-Allow-Methods "HEAD, GET, POST, PUT, PATCH, DELETE, OPTIONS" + Header always set Access-Control-Allow-Headers "Accept, Authorization, Content-Security-Policy, Content-Type, Location, Origin, X-Requested-With" + Header always set Access-Control-Expose-Headers "Content-Security-Policy, Location" Header always set Access-Control-Max-Age "0" - Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token" # Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request. RewriteEngine On RewriteCond %{REQUEST_METHOD} OPTIONS diff --git a/cfg/vhost-gen/apache24.yml-example-rproxy b/cfg/vhost-gen/apache24.yml-example-rproxy index a3b566be..77c9882c 100644 --- a/cfg/vhost-gen/apache24.yml-example-rproxy +++ b/cfg/vhost-gen/apache24.yml-example-rproxy @@ -137,13 +137,16 @@ features: Require all granted + # https://stackoverflow.com/a/42558499 + # https://fetch.spec.whatwg.org/#forbidden-header-name xdomain_request: | # Allow cross domain request from these hosts SetEnvIf Origin "__REGEX__" AccessControlAllowOrigin=$0 - Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin - Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" + Header always set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin + Header always set Access-Control-Allow-Methods "HEAD, GET, POST, PUT, PATCH, DELETE, OPTIONS" + Header always set Access-Control-Allow-Headers "Accept, Authorization, Content-Security-Policy, Content-Type, Location, Origin, X-Requested-With" + Header always set Access-Control-Expose-Headers "Content-Security-Policy, Location" Header always set Access-Control-Max-Age "0" - Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token" # Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request. RewriteEngine On RewriteCond %{REQUEST_METHOD} OPTIONS diff --git a/cfg/vhost-gen/apache24.yml-example-vhost b/cfg/vhost-gen/apache24.yml-example-vhost index 5287dfba..c58eacf9 100644 --- a/cfg/vhost-gen/apache24.yml-example-vhost +++ b/cfg/vhost-gen/apache24.yml-example-vhost @@ -206,13 +206,16 @@ features: Require all granted + # https://stackoverflow.com/a/42558499 + # https://fetch.spec.whatwg.org/#forbidden-header-name xdomain_request: | # Allow cross domain request from these hosts SetEnvIf Origin "__REGEX__" AccessControlAllowOrigin=$0 - Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin - Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" + Header always set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin + Header always set Access-Control-Allow-Methods "HEAD, GET, POST, PUT, PATCH, DELETE, OPTIONS" + Header always set Access-Control-Allow-Headers "Accept, Authorization, Content-Security-Policy, Content-Type, Location, Origin, X-Requested-With" + Header always set Access-Control-Expose-Headers "Content-Security-Policy, Location" Header always set Access-Control-Max-Age "0" - Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token" # Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request. RewriteEngine On RewriteCond %{REQUEST_METHOD} OPTIONS diff --git a/cfg/vhost-gen/nginx.yml-example-rproxy b/cfg/vhost-gen/nginx.yml-example-rproxy index 6d983509..c7bea226 100644 --- a/cfg/vhost-gen/nginx.yml-example-rproxy +++ b/cfg/vhost-gen/nginx.yml-example-rproxy @@ -114,11 +114,12 @@ features: xdomain_request: | # Allow cross domain request from these hosts + # https://fetch.spec.whatwg.org/#forbidden-header-name if ( $http_origin ~* (__REGEX__) ) { - add_header "Access-Control-Allow-Origin" "$http_origin"; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'; - add_header 'Access-Control-Expose-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'; + add_header "Access-Control-Allow-Origin" "$http_origin"; + add_header 'Access-Control-Allow-Methods' 'HEAD, GET, POST, PUT, PATCH, DELETE, OPTIONS'; + add_header 'Access-Control-Allow-Headers' 'Accept, Authorization, Content-Security-Policy, Content-Type, Location, Origin, X-Requested-With'; + add_header 'Access-Control-Expose-Headers' 'Content-Security-Policy, Location'; add_header 'Access-Control-Max-Age' 0; return 200; } diff --git a/cfg/vhost-gen/nginx.yml-example-vhost b/cfg/vhost-gen/nginx.yml-example-vhost index 555864df..5d0de860 100644 --- a/cfg/vhost-gen/nginx.yml-example-vhost +++ b/cfg/vhost-gen/nginx.yml-example-vhost @@ -166,11 +166,12 @@ features: xdomain_request: | # Allow cross domain request from these hosts + # https://fetch.spec.whatwg.org/#forbidden-header-name if ( $http_origin ~* (__REGEX__) ) { - add_header "Access-Control-Allow-Origin" "$http_origin"; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'; - add_header 'Access-Control-Expose-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'; + add_header "Access-Control-Allow-Origin" "$http_origin"; + add_header 'Access-Control-Allow-Methods' 'HEAD, GET, POST, PUT, PATCH, DELETE, OPTIONS'; + add_header 'Access-Control-Allow-Headers' 'Accept, Authorization, Content-Security-Policy, Content-Type, Location, Origin, X-Requested-With'; + add_header 'Access-Control-Expose-Headers' 'Content-Security-Policy, Location'; add_header 'Access-Control-Max-Age' 0; return 200; } diff --git a/compose/docker-compose.override.yml-php-multi.yml b/compose/docker-compose.override.yml-php-multi.yml index e9738daf..9f567844 100644 --- a/compose/docker-compose.override.yml-php-multi.yml +++ b/compose/docker-compose.override.yml-php-multi.yml @@ -34,7 +34,7 @@ services: php54: <<: *default-php - image: devilbox/php-fpm:5.4-prod-0.148 + image: devilbox/php-fpm:5.4-prod-0.150 hostname: php54 networks: app_net: @@ -52,7 +52,7 @@ services: php55: <<: *default-php - image: devilbox/php-fpm:5.5-prod-0.148 + image: devilbox/php-fpm:5.5-prod-0.150 hostname: php55 networks: app_net: @@ -70,7 +70,7 @@ services: php56: <<: *default-php - image: devilbox/php-fpm:5.6-prod-0.148 + image: devilbox/php-fpm:5.6-prod-0.150 hostname: php56 networks: app_net: @@ -88,7 +88,7 @@ services: php70: <<: *default-php - image: devilbox/php-fpm:7.0-prod-0.148 + image: devilbox/php-fpm:7.0-prod-0.150 hostname: php70 networks: app_net: @@ -106,7 +106,7 @@ services: php71: <<: *default-php - image: devilbox/php-fpm:7.1-prod-0.148 + image: devilbox/php-fpm:7.1-prod-0.150 hostname: php71 networks: app_net: @@ -124,7 +124,7 @@ services: php72: <<: *default-php - image: devilbox/php-fpm:7.2-prod-0.148 + image: devilbox/php-fpm:7.2-prod-0.150 hostname: php72 networks: app_net: @@ -142,7 +142,7 @@ services: php73: <<: *default-php - image: devilbox/php-fpm:7.3-prod-0.148 + image: devilbox/php-fpm:7.3-prod-0.150 hostname: php73 networks: app_net: @@ -160,7 +160,7 @@ services: php74: <<: *default-php - image: devilbox/php-fpm:7.4-prod-0.148 + image: devilbox/php-fpm:7.4-prod-0.150 hostname: php74 networks: app_net: @@ -178,7 +178,7 @@ services: php80: <<: *default-php - image: devilbox/php-fpm:8.0-prod-0.148 + image: devilbox/php-fpm:8.0-prod-0.150 hostname: php80 networks: app_net: @@ -196,7 +196,7 @@ services: php81: <<: *default-php - image: devilbox/php-fpm:8.1-prod-0.148 + image: devilbox/php-fpm:8.1-prod-0.150 hostname: php81 networks: app_net: @@ -214,7 +214,7 @@ services: php82: <<: *default-php - image: devilbox/php-fpm:8.2-prod-0.148 + image: devilbox/php-fpm:8.2-prod-0.150 hostname: php82 networks: app_net: diff --git a/docker-compose.yml b/docker-compose.yml index 10cd107a..cf658ce6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -89,6 +89,7 @@ services: extra_hosts: docker.for.lin.host.internal: 172.16.238.1 docker.for.lin.localhost: 172.16.238.1 + host.docker.internal: host-gateway networks: app_net: @@ -99,7 +100,7 @@ services: # PHP # ------------------------------------------------------------ php: - image: devilbox/php-fpm:${PHP_SERVER}-work-0.148 + image: devilbox/php-fpm:${PHP_SERVER}-work-0.150 hostname: php ## @@ -171,6 +172,7 @@ services: extra_hosts: docker.for.lin.host.internal: 172.16.238.1 docker.for.lin.localhost: 172.16.238.1 + host.docker.internal: host-gateway networks: app_net: @@ -227,7 +229,7 @@ services: # Web Server # ------------------------------------------------------------ httpd: - image: devilbox/${HTTPD_SERVER}:${HTTPD_FLAVOUR:-alpine}-1.0-beta2 + image: devilbox/${HTTPD_SERVER}:${HTTPD_FLAVOUR:-alpine}-1.0 hostname: httpd environment: diff --git a/docs/img/example_01-vhost.png b/docs/img/example_01-vhost.png new file mode 100644 index 00000000..3ed7017e Binary files /dev/null and b/docs/img/example_01-vhost.png differ diff --git a/docs/img/example_02-vhost.png b/docs/img/example_02-vhost.png new file mode 100644 index 00000000..3c41772d Binary files /dev/null and b/docs/img/example_02-vhost.png differ diff --git a/env-example b/env-example index d200159b..9ffc621d 100644 --- a/env-example +++ b/env-example @@ -90,17 +90,20 @@ LOCAL_LISTEN_ADDR= ### ### Note: In addition to period or dot character ('.'), only ALPHA ([a-zA-Z]+) characters are supported. ### Mac users should not use the .local TLD, as this will not resolve properly due Apple's -### use of Multicast DNS.## +### use of Multicast DNS. +### +### Note: If you use 'dvl.to' then there is no need for additional DNS as this always points +### to 127.0.0.1 by default. ### ### Example: ### TLD_SUFFIX=loc -### Makes your project available under xxxx.loc +### Makes your project available under .loc ### ### Example: ### TLD_SUFFIX=local -### Makes your project available under xxxx.local +### Makes your project available under .local ### -TLD_SUFFIX=loc +TLD_SUFFIX=dvl.to ###