mirror of
https://github.com/cytopia/devilbox.git
synced 2025-06-24 18:25:17 +00:00
Compare commits
30 Commits
Author | SHA1 | Date | |
---|---|---|---|
ca90af0fb0 | |||
7bd6b34698 | |||
2677422250 | |||
200000cb5b | |||
8560267fdc | |||
8c13144d3e | |||
2f8fc59dd9 | |||
d9fb88058f | |||
249b132e58 | |||
6e34d3b263 | |||
68bd88d304 | |||
23a6aed10d | |||
0dfd63d7f9 | |||
3804a3b6f3 | |||
9cfc69e5bb | |||
56555e87a5 | |||
5e90a3a35d | |||
54e17f5ec5 | |||
b5d19264de | |||
f6bbdc72fd | |||
2f9ba2e30a | |||
fa0c8f5632 | |||
64330b5b12 | |||
872340e14b | |||
5eb2ee8ca0 | |||
aff86a6b15 | |||
af98125279 | |||
7f294735e7 | |||
a07b3442f1 | |||
01fb99ec1a |
@ -13,8 +13,8 @@ error_reporting(-1);
|
||||
putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1');
|
||||
|
||||
|
||||
$DEVILBOX_VERSION = 'v1.9.1';
|
||||
$DEVILBOX_DATE = '2021-05-19';
|
||||
$DEVILBOX_VERSION = 'v1.9.3';
|
||||
$DEVILBOX_DATE = '2022-01-25';
|
||||
$DEVILBOX_API_PAGE = 'devilbox-api/status.json';
|
||||
|
||||
//
|
||||
@ -127,15 +127,27 @@ function loadClass($class) {
|
||||
break;
|
||||
|
||||
case 'Redis':
|
||||
|
||||
// Check if redis is using a password
|
||||
$REDIS_ROOT_PASSWORD = '';
|
||||
|
||||
$_REDIS_ARGS = loadClass('Helper')->getEnv('REDIS_ARGS');
|
||||
$_REDIS_PASS = preg_split("/--requirepass\s+/", $_REDIS_ARGS);
|
||||
if (is_array($_REDIS_PASS) && count($_REDIS_PASS)) {
|
||||
// In case the option is specified multiple times, use the last effective one.
|
||||
$_REDIS_PASS = $_REDIS_PASS[count($_REDIS_PASS)-1];
|
||||
|
||||
/*
|
||||
* This pattern will match optional quoted string, 'my password' or "my password"
|
||||
* or if there aren't any quotes, it will match up until the next space.
|
||||
*/
|
||||
$_REDIS_PASS = array();
|
||||
preg_match_all('/--requirepass\s+("|\')?(?(1)(.*)|([^\s]*))(?(1)\1|)/', $_REDIS_ARGS, $_REDIS_PASS, PREG_SET_ORDER);
|
||||
|
||||
if (! empty($_REDIS_PASS)) {
|
||||
/*
|
||||
* In case the option is specified multiple times, use the last effective one.
|
||||
*
|
||||
* preg_match_all returns a multi-dimensional array, the first level array is in order of which was matched first,
|
||||
* and the password string is either matched in group 2 or group 3 which is always the end of the sub-array.
|
||||
*/
|
||||
$_REDIS_PASS = end(end($_REDIS_PASS));
|
||||
|
||||
if (strlen($_REDIS_PASS) > 0) {
|
||||
$REDIS_ROOT_PASSWORD = $_REDIS_PASS;
|
||||
}
|
||||
|
21
.devilbox/www/htdocs/assets/js/html-email.js
Normal file
21
.devilbox/www/htdocs/assets/js/html-email.js
Normal file
@ -0,0 +1,21 @@
|
||||
class HtmlEmail extends HTMLElement {
|
||||
constructor() {
|
||||
super();
|
||||
this.attachShadow({ mode: 'open' });
|
||||
|
||||
let emailContent;
|
||||
try {
|
||||
emailContent = window.atob(this.dataset.content);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return;
|
||||
}
|
||||
|
||||
const container = document.createElement('div');
|
||||
container.innerHTML = emailContent;
|
||||
|
||||
this.shadowRoot.appendChild(container);
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define('html-email', HtmlEmail);
|
@ -159,6 +159,17 @@ $messages = $MyMbox->get($sortOrderArr);
|
||||
<?php
|
||||
$message = htmlentities($data['raw']);
|
||||
$structure = $data['decoded'];
|
||||
$body = null;
|
||||
|
||||
if (isset($structure->body)) {
|
||||
$body = $structure->body;
|
||||
}
|
||||
elseif(isset($structure->parts[1]->body)) {
|
||||
$body = $structure->parts[1]->body;
|
||||
}
|
||||
elseif(isset($structure->parts[0]->body)) {
|
||||
$body = $structure->parts[0]->body;
|
||||
}
|
||||
?>
|
||||
<tr id="<?php echo $data['num'];?>" class="subject">
|
||||
<td><?php echo $data['num'];?></td>
|
||||
@ -174,16 +185,13 @@ $messages = $MyMbox->get($sortOrderArr);
|
||||
<tr id="mail-<?php echo $data['num'];?>" style="display:none">
|
||||
<td></td>
|
||||
<td colspan="4">
|
||||
<?php if (isset($structure->body)): ?>
|
||||
<?php echo htmlentities($structure->body) ?>
|
||||
<?php elseif(isset($structure->parts[1]->body)): ?>
|
||||
<?php echo htmlentities($structure->parts[1]->body) ?>
|
||||
<?php elseif(isset($structure->parts[0]->body)): ?>
|
||||
<?php echo htmlentities($structure->parts[0]->body) ?>
|
||||
<?php if ($body !== null): ?>
|
||||
<html-email data-content="<?php echo base64_encode($body) ?>">
|
||||
</html-email>
|
||||
<?php else: ?>
|
||||
<?php echo '<div class="alert alert-warning" role="alert">
|
||||
<div class="alert alert-warning" role="alert">
|
||||
No valid body found
|
||||
</div>' ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<hr>
|
||||
<p><a class="btn btn-primary" data-toggle="collapse" href="#email-<?php echo $data['num'];?>" aria-expanded="false" aria-controls="email-<?php echo $data['num'];?>">Raw source</a></p>
|
||||
@ -215,5 +223,6 @@ $messages = $MyMbox->get($sortOrderArr);
|
||||
// Handler for .ready() called.
|
||||
});
|
||||
</script>
|
||||
<script src="/assets/js/html-email.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
18
CHANGELOG.md
18
CHANGELOG.md
@ -6,6 +6,24 @@ Make sure to have a look at [UPDATING.md](https://github.com/cytopia/devilbox/bl
|
||||
## Unreleased
|
||||
|
||||
|
||||
## Release v1.9.3 (2022-01-24)
|
||||
|
||||
#### Fixed
|
||||
- Updated PHP Docker Images: [#221](https://github.com/devilbox/docker-php-fpm/pull/221)
|
||||
- Updated PHP Docker Images: [#222](https://github.com/devilbox/docker-php-fpm/pull/222)
|
||||
- Update MySQL Docker Images: [#10](https://github.com/devilbox/docker-mysql/pull/10)
|
||||
- Fixed documentation build issues
|
||||
- Fixed intranet PHP code to work with legacy versions
|
||||
|
||||
|
||||
## Release v1.9.2 (2021-06-04)
|
||||
|
||||
#### Added
|
||||
- Added Homebrew for all PHP images
|
||||
- Added `pdo_sqlsrv` PHP extension for 7.4 and 8.0
|
||||
- Xdebug 3.0 documentation
|
||||
|
||||
|
||||
## Release v1.9.1 (2021-05-19)
|
||||
|
||||
#### Added
|
||||
|
14
README.md
14
README.md
@ -630,8 +630,8 @@ The following tools will assist you on creating new projects easily as well as h
|
||||
<td><code>linkcheck</code> is a command line tool that searches for URLs in files (optionally limited by extension) and validates their HTTP status code.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>:wrench: <a href="https://linuxbrew.sh/">linuxbrew</a></td>
|
||||
<td><code>brew</code> is a MacOS Homenbrew clone for Linux.</td>
|
||||
<td>:wrench: <a href="https://brew.sh/">homebrew</a></td>
|
||||
<td><code>brew</code> is a MacOS Homenbrew for Linux.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>:wrench: <a href="https://github.com/DavidAnson/markdownlint">markdownlint</a></td>
|
||||
@ -734,7 +734,7 @@ The Devilbox is a development stack, so it is made sure that a lot of PHP module
|
||||
| <small>date</small> | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
|
||||
| <small>dba</small> | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 |
|
||||
| <small>dom</small> | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
|
||||
| <small>enchant</small> | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 |
|
||||
| <small>enchant</small> | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | | 🗸 | 🗸 |
|
||||
| <small>ereg</small> | | ✔ | ✔ | ✔ | ✔ | | | | | | | |
|
||||
| <small>exif</small> | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 |
|
||||
| <small>FFI</small> | | | | | | | | | | 🗸 | ✔ | ✔ |
|
||||
@ -756,7 +756,7 @@ The Devilbox is a development stack, so it is made sure that a lot of PHP module
|
||||
| <small>ldap</small> | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 |
|
||||
| <small>libxml</small> | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
|
||||
| <small>mbstring</small> | ✔ | 🗸 | 🗸 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
|
||||
| <small>mcrypt</small> | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 |
|
||||
| <small>mcrypt</small> | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | |
|
||||
| <small>memcache</small> | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 |
|
||||
| <small>memcached</small> | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 |
|
||||
| <small>mhash</small> | | | | | ✔ | | | | | | | |
|
||||
@ -778,7 +778,7 @@ The Devilbox is a development stack, so it is made sure that a lot of PHP module
|
||||
| <small>PDO_OCI</small> | | | | | | d | d | d | d | d | d | d |
|
||||
| <small>pdo_pgsql</small> | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 |
|
||||
| <small>pdo_sqlite</small> | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
|
||||
| <small>pdo_sqlsrv</small> | | | | | | d | d | d | d | | | |
|
||||
| <small>pdo_sqlsrv</small> | | | | | | d | d | d | d | d | d | |
|
||||
| <small>pgsql</small> | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 |
|
||||
| <small>phalcon</small> | | d | d | d | d | d | d | d | d | d | | |
|
||||
| <small>Phar</small> | 🗸 | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
|
||||
@ -801,10 +801,10 @@ The Devilbox is a development stack, so it is made sure that a lot of PHP module
|
||||
| <small>SPL</small> | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
|
||||
| <small>SQLite</small> | ✔ | ✔ | | | | | | | | | | |
|
||||
| <small>sqlite3</small> | | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
|
||||
| <small>sqlsrv</small> | | | | | | d | d | d | d | d | | |
|
||||
| <small>sqlsrv</small> | | | | | | d | d | d | d | d | d | |
|
||||
| <small>ssh2</small> | | | | | | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | |
|
||||
| <small>standard</small> | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
|
||||
| <small>swoole</small> | | d | d | d | d | d | d | d | d | d | | |
|
||||
| <small>swoole</small> | | d | d | d | d | d | d | d | d | d | d | |
|
||||
| <small>sysvmsg</small> | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 |
|
||||
| <small>sysvsem</small> | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 |
|
||||
| <small>sysvshm</small> | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 |
|
||||
|
@ -95,7 +95,7 @@ services:
|
||||
# PHP
|
||||
# ------------------------------------------------------------
|
||||
php:
|
||||
image: devilbox/php-fpm:${PHP_SERVER}-work-0.125
|
||||
image: devilbox/php-fpm:${PHP_SERVER}-work-0.130
|
||||
hostname: php
|
||||
|
||||
##
|
||||
@ -320,7 +320,7 @@ services:
|
||||
# MySQL Database
|
||||
# ------------------------------------------------------------
|
||||
mysql:
|
||||
image: devilbox/mysql:${MYSQL_SERVER}-0.7
|
||||
image: devilbox/mysql:${MYSQL_SERVER}-0.8
|
||||
hostname: mysql
|
||||
|
||||
environment:
|
||||
|
@ -28,7 +28,7 @@ linkcheck2:
|
||||
--rm \
|
||||
$$(tty -s && echo "-it" || echo) \
|
||||
-v $(PWD):/data \
|
||||
cytopia/linkcheck -l -k -r 60 -t 30 -e rst -c '200,204' _includes/
|
||||
cytopia/linkcheck -l -k -r 60 -t 30 -e rst -c '200,204,403' _includes/
|
||||
|
||||
linkcheck:
|
||||
docker run \
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
.. |ext_lnk_doc_bind_ttl| raw:: html
|
||||
|
||||
<a target="_blank" href="http://www.zytrax.com/books/dns/apa/ttl.html">
|
||||
<a target="_blank" href="https://bind9.readthedocs.io/en/latest/reference.html?highlight=ttl#the-ttl-directive">
|
||||
BIND TTL <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||
</a>
|
||||
|
||||
.. |ext_lnk_doc_bind_soa| raw:: html
|
||||
|
||||
<a target="_blank" href="http://www.zytrax.com/books/dns/ch8/soa.html">
|
||||
<a target="_blank" href="https://bind9.readthedocs.io/en/latest/introduction.html?highlight=soa#secondary-servers">
|
||||
BIND SOA <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||
</a>
|
||||
|
||||
|
@ -72,13 +72,13 @@
|
||||
|
||||
.. |ext_lnk_example_phalcon_documentation| raw:: html
|
||||
|
||||
<a target="_blank" href="https://docs.phalconphp.com/latest/en/devtools-usage">
|
||||
<a target="_blank" href="https://docs.phalcon.io/4.0/en/environments-devilbox">
|
||||
Official Phalcon Documentation <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||
</a>
|
||||
|
||||
.. |ext_lnk_example_photon_cms| raw:: html
|
||||
|
||||
<a target="_blank" href="https://photoncms.com/resources/installing">
|
||||
<a target="_blank" href="https://docs.photoncms.com/">
|
||||
Official Photon CMS Documentation <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||
</a>
|
||||
|
||||
|
@ -21,6 +21,12 @@
|
||||
awesome-ci <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||
</a>
|
||||
|
||||
.. |ext_lnk_tool_homebrew| raw:: html
|
||||
|
||||
<a target="_blank" href="https://brew.sh/">
|
||||
Linux brew <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||
</a>
|
||||
|
||||
.. |ext_lnk_tool_codecept| raw:: html
|
||||
|
||||
<a target="_blank" href="https://codeception.com/">
|
||||
@ -203,7 +209,7 @@
|
||||
|
||||
.. |ext_lnk_tool_photon| raw:: html
|
||||
|
||||
<a target="_blank" href="https://photoncms.com/resources/installing">
|
||||
<a target="_blank" href="https://docs.photoncms.com/">
|
||||
Photon CMS cli <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
|
||||
</a>
|
||||
|
||||
|
@ -128,7 +128,7 @@ Now save the file and you can start the Devilbox again.
|
||||
# Navigate to the Devilbox directory
|
||||
host> cd path/to/devilbox
|
||||
|
||||
# Stop all container
|
||||
# Start all container
|
||||
host> docker-compose up php httpd bind
|
||||
|
||||
.. seealso:: :ref:`start_the_devilbox`
|
||||
@ -193,7 +193,7 @@ Now save the file and you can start the Devilbox again.
|
||||
# Navigate to the Devilbox directory
|
||||
host> cd path/to/devilbox
|
||||
|
||||
# Stop all container
|
||||
# Start all container
|
||||
host> docker-compose up php httpd bind
|
||||
|
||||
.. seealso:: :ref:`start_the_devilbox`
|
||||
|
@ -148,7 +148,7 @@ Ensure to read the links below to understand why this problem exists and how the
|
||||
The Docker documentation will also give you alternative caching options to consider.
|
||||
|
||||
.. seealso::
|
||||
* https://github.com/cytopia/devilbox/issues/105#issuecomment-426229921
|
||||
* https://github.com/cytopia/devilbox/issues/105
|
||||
* https://forums.docker.com/t/file-access-in-mounted-volumes-extremely-slow-cpu-bound/8076/281
|
||||
* https://docs.docker.com/docker-for-mac/osxfs/
|
||||
* :ref:`env_mount_options`
|
||||
|
@ -47,7 +47,7 @@ When using Docker for Windows you can use ``127.0.0.1`` for the IP address.
|
||||
127.0.0.1 project-1.loc
|
||||
127.0.0.1 www.project-1.loc
|
||||
|
||||
3. Safe the file and verify the DNS entries with the ``ping`` command
|
||||
3. Save the file and verify the DNS entries with the ``ping`` command
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
@ -121,6 +121,23 @@ Copy/paste all of the following lines into the above created ``xdebug.ini`` file
|
||||
; Optional: Set to true to always auto-start xdebug
|
||||
xdebug.remote_autostart=false
|
||||
|
||||
`Xdebug 3.0 changes <https://xdebug.org/docs/upgrade_guide>`_:
|
||||
.. code-block:: ini
|
||||
:caption: xdebug.ini
|
||||
|
||||
; Defaults
|
||||
xdebug.mode=debug
|
||||
xdegub.client_port=9000
|
||||
|
||||
; The Linux Way
|
||||
xdebug.discover_client_host=1
|
||||
|
||||
; idekey value is specific to Atom
|
||||
xdebug.session=xdebug.atom
|
||||
|
||||
; Optional: Set to true to always auto-start xdebug
|
||||
xdebug.start_with_request=Yes
|
||||
|
||||
.. note:: Host os and editor specific settings are highlighted in yellow and are worth googling to get a better understanding of the tools you use and to be more efficient at troubleshooting.
|
||||
|
||||
|
||||
|
@ -53,7 +53,7 @@ Then you need to ensure that :ref:`env_host_port_bind` is set to ``53``.
|
||||
host> vi .env
|
||||
HOST_PORT_BIND=53
|
||||
|
||||
Before starting up the Devilbox, ensure that port ``53`` is not already used on ``127.0.0.1``.
|
||||
Before starting up the Devilbox, ensure that port ``53`` is not already used.
|
||||
|
||||
.. code-block:: bash
|
||||
:emphasize-lines: 2
|
||||
|
@ -21,6 +21,8 @@ The PHP container is your workhorse and these are your tools:
|
||||
+----------------------+---------------------------------------+
|
||||
| various binaries | |ext_lnk_tool_awesome_ci| |
|
||||
+----------------------+---------------------------------------+
|
||||
| ``brew`` | |ext_lnk_tool_homebrew| |
|
||||
+----------------------+---------------------------------------+
|
||||
| ``codecept`` | |ext_lnk_tool_codecept| |
|
||||
+----------------------+---------------------------------------+
|
||||
| ``composer`` | |ext_lnk_tool_composer| |
|
||||
|
@ -135,7 +135,7 @@ have to get support from the docker/for-mac GitHub repository or forum.
|
||||
|
||||
.. seealso::
|
||||
* https://github.com/cytopia/devilbox/issues/539
|
||||
* https://github.com/docker/for-mac/issues/371#issuecomment-242047368
|
||||
* https://github.com/docker/for-mac/issues/371
|
||||
* https://forums.docker.com/t/no-space-left-on-device-error/10894
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user