Merge pull request from cytopia/release/v1.0.1

Bugfix Release v1.0.1
This commit is contained in:
cytopia 2019-03-24 12:09:55 +01:00 committed by GitHub
commit 6da8f35cf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 113 additions and 240 deletions

@ -13,8 +13,8 @@ error_reporting(-1);
putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1');
$DEVILBOX_VERSION = 'v1.0.0';
$DEVILBOX_DATE = '2019-03-18';
$DEVILBOX_VERSION = 'v1.0.1';
$DEVILBOX_DATE = '2019-03-24';
$DEVILBOX_API_PAGE = 'devilbox-api/status.json';
//

@ -3,21 +3,37 @@
Make sure to have a look at [UPDATING](https://github.com/cytopia/devilbox/blob/master/UPDATING.md) to see any required steps for updating
major versions.
## [unreleasd]
## Bugfix Release v1.0.1 (2019-03-24)
This is a bugfix release and everybody is encouraged to upgrade to this tag as soon as possible.
No explicit actions to be taken for updating.
#### Fixed
- [#373](https://github.com/cytopia/devilbox/issues/373) Read custom MySQL configuration
- [#540](https://github.com/cytopia/devilbox/issues/540) Fix '&' password substitution in mysqldump-secure
- [#209](https://github.com/cytopia/devilbox/issues/209) Documentation for Xdebug on Docker for Windows
#### Changed
- Split Bind container into internal DNS and autoDNS: #248
- This fixes various issues with Docker Toolbox and DNS resolution: #119
- Updated MongoDB cli tools in PHP image
- Updated PostgreSQL cli tools in PHP image
- MySQL images are now bound to a specific Docker tag and are built nightly
- [#506](https://github.com/cytopia/devilbox/issues/506) Documentation improvements for connecting to databases
#### Added
- [#536](https://github.com/cytopia/devilbox/issues/536) Added @vue/cli and @vue/cli-service-global
## v1.0.0
## Release v1.0.0 (2019-03-19)
This is the first major stable release of the Devilbox.
#### Changed
- Everything from v1.0.0-alpha1 has been backported
- Everything from v0.15.0 has been backported
## v1.0.0-alpha1
## Pre-Release v1.0.0-alpha1 (2019-03-09)
#### Changed
- Use Docker volumes instead of directory mounts for stateful data (MySQL, PgSQL and MongoDB)
@ -26,7 +42,29 @@ major versions.
- Use Official MySQL, MariaDB and Percona Docker container
## v0.15.0
## Release v0.15.0 (2019-03-09)
This will be the last v0.x release.
#### Fixed
- break on errors in wrong vhost-gen overwrite
- XSS vulnerability in email display
- Various fixes in Documentation
- vhost-gen fixes
#### Changed
- Use semantic versioning
- This allows for faster releases
- This allows for better visibility of breaking changes (note that breaking changes might still occur before release v1.0.0)
- Autologin for phpMyAdmin
- Autologin for phpPgAdmin
- Intranet to show vhost and vhost-gen overwrite config per vhost
- Allow to specify Redis startup arguments (e.g.: password)
- Fixed hostnames for all Docker container
- PHP-FPM workers changed from `dynamic` to `ondemand`
- Allow Apache to server underscore domains
- Changed Nginx `client_max_body_size` to `0` to be in sync with Apache
- Document failing start behaviour of MySQL container
#### Added
- [CHANGELOG](https://github.com/cytopia/devilbox/blob/master/CHANGELOG.md) by the standard of: https://keepachangelog.com
@ -45,6 +83,7 @@ major versions.
- PHP 5.2
- PHP 5.3
- PHP 7.4
- PHP 8.0
- Alpine images where possible
- Docker Compose overwrite images:
- Blackfire
@ -89,23 +128,3 @@ major versions.
- Typo3
- GitHub Issue templates
- Discourse forum link: https://devilbox.discourse.group
#### Changed
- Use semantic versioning
- This allows for faster releases
- This allows for better visibility of breaking changes (note that breaking changes might still occur before release v1.0.0)
- Autologin for phpMyAdmin
- Autologin for phpPgAdmin
- Intranet to show vhost and vhost-gen overwrite config per vhost
- Allow to specify Redis startup arguments (e.g.: password)
- Fixed hostnames for all Docker container
- PHP-FPM workers changed from `dynamic` to `ondemand`
- Allow Apache to server underscore domains
- Changed Nginx `client_max_body_size` to `0` to be in sync with Apache
- Document failing start behaviour of MySQL container
#### Fixed
- break on errors in wrong vhost-gen overwrite
- XSS vulnerability in email display
- Various fixes in Documentation
- vhost-gen fixes

@ -773,7 +773,7 @@ The Devilbox is a development stack, so it is made sure that a lot of PHP module
| tidy | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 |
| tokenizer | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| uploadprogress | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 |
| wddx | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 |
| wddx | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | |
| xdebug | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | 🗸 | | |
| xml | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
| xmlreader | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |

@ -95,7 +95,7 @@ services:
# PHP
# ------------------------------------------------------------
php:
image: devilbox/php-fpm:${PHP_SERVER}-work-0.80
image: devilbox/php-fpm:${PHP_SERVER}-work-0.81
hostname: php
##
@ -309,7 +309,7 @@ services:
# MySQL Database
# ------------------------------------------------------------
mysql:
image: devilbox/mysql:${MYSQL_SERVER}
image: devilbox/mysql:${MYSQL_SERVER}-0.3
hostname: mysql
environment:

Binary file not shown.

Before

(image error) Size: 39 KiB

After

(image error) Size: 30 KiB

Binary file not shown.

Before

(image error) Size: 27 KiB

After

(image error) Size: 34 KiB

@ -231,6 +231,12 @@
Text-mode Interface for Git <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
</a>
.. |ext_lnk_tool_vue| raw:: html
<a target="_blank" href="https://cli.vuejs.org">
Standard Tooling for Vue.js Development <img src="https://raw.githubusercontent.com/cytopia/icons/master/11x11/ext-link.png" />
</a>
.. |ext_lnk_tool_webpack| raw:: html
<a target="_blank" href="https://webpack.js.org">

@ -0,0 +1,19 @@
+---------------------------+-------+----------+----------------+
| Container | Name | Hostname | IP Address |
+===========================+=======+==========+================+
| DNS | bind | bind | 172.16.238.100 |
+---------------------------+-------+----------+----------------+
| PHP | php | php | 172.16.238.10 |
+---------------------------+-------+----------+----------------+
| Apache, Nginx | httpd | httpd | 172.16.238.11 |
+---------------------------+-------+----------+----------------+
| MySQL, MariaDB, PerconaDB | mysql | mysql | 172.16.238.12 |
+---------------------------+-------+----------+----------------+
| PostgreSQL | pgsql | pgsql | 172.16.238.13 |
+---------------------------+-------+----------+----------------+
| Redis | redis | redis | 172.16.238.14 |
+---------------------------+-------+----------+----------------+
| Memcached | memcd | memcd | 172.16.238.15 |
+---------------------------+-------+----------+----------------+
| MongoDB | mongo | mongo | 172.16.238.16 |
+---------------------------+-------+----------+----------------+

@ -74,19 +74,11 @@ PHP project hostname settings
=============================
When configuring your PHP projects to use MySQL, PostgreSQL, Redis, Mongo and other services,
make sure to set the hostname of each of those services to ``127.0.0.1``.
make sure to set the hostname/address of each of those services to how they are defined within the
Devilbox network:
**Why is that?**
.. include:: /_includes/snippets/core-container.rst
The PHP container port-forwards each service port to its own listen address on ``127.0.0.1``.
The Devilbox also exposes each of those service ports to the host operating system on ``127.0.0.1``.
This allows you to keep your project configuration unchanged and have the same behaviour inside the
PHP container and on your host operating system.
.. important::
Do not mix up ``localhost`` with ``127.0.0.1``. They behave differently!
Use ``127.0.0.1`` and do not use ``localhost``.
As an example, if you want to access the MySQL database from within the PHP container, you do the
following:
@ -101,10 +93,11 @@ following:
host> ./shell.sh
# Enter the MySQL console
php> mysql -u root -h 127.0.0.1 -p
php> mysql -u root -h mysql -p
mysql>
The very same command applies to access the MySQL database from your host operating system:
To access the MySQL database from your host operating system you would need the address to what it
exposes to on your host (usually ``127.0.0.1``):
.. code-block:: bash
:emphasize-lines: 2
@ -113,17 +106,14 @@ The very same command applies to access the MySQL database from your host operat
host> mysql -u root -h 127.0.0.1 -p
mysql>
So no matter if you use the Devilbox or have another LAMP stack installed locally on your host
operating system, you do not have to change your configuration files if you stick to this tip.
So any of your projects php files that configure MySQL as an example should point the hostname
or IP address of the MySQL server to ``127.0.0.1``:
Any of your projects php files that configure MySQL as an example should point the hostname
or IP address of the MySQL server to ``mysql``:
.. code-block:: php
<?php
// MySQL server connection in your project configuration
mysql_host = '127.0.0.1';
mysql_host = 'mysql';
mysql_port = '3306';
mysql_user = 'someusername';
mysql_pass = 'somepassword';
@ -135,11 +125,11 @@ or IP address of the MySQL server to ``127.0.0.1``:
Timezone
========
The :ref:`env_timezone` value will affect PHP, web server and MySQL container equally. It does
The :ref:`env_timezone` value will affect PHP and web serverequally. It does
however not affect any other official Docker container that are used within the Devilbox. This is
an issue that is currently still being worked on.
Feel free to change this to any timezone you require for PHP and MySQL, but keep in mind that
Feel free to change this to any timezone you require for PHP, but keep in mind that
timezone values for databases can be painful, once you want to switch to a different timezone.
A good practice is to always use ``UTC`` on databases and have your front-end application calculate

@ -36,41 +36,14 @@ Gather Host IP address
On Windows you will have to manually retrieve the IP address to which Xdebug should connect to
via ``xdebug.remote_host``.
When gathering the Windows host IP address you will need to distinguish between two cases depending
on your configuration:
1. DockerNat IP address (no custom configuration applied)
2. Virtual Switch IP address (you have created a Virtual Switch to allow Internet access to your container)
Only one of the options may be valid for your setup.
DockerNAT IP address
^^^^^^^^^^^^^^^^^^^^
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``DockerNAT`` (e.g.: ``192.168.0.12``)
.. important::
``192.168.0.12`` is meant as an example and will eventually differ on your system.
Ensure you substitute it with the correct IP address.
.. seealso:: :ref:`howto_open_terminal_on_win`
Virtual Switch IP address
^^^^^^^^^^^^^^^^^^^^^^^^^
When you have created a custom Virtual Switch for you Docker setup, you will have to gather the
Virtual Switch IP address instead of the DockerNat IP address.
Let's assume you have created the switch by the name **New Virtual Switch** as follows:
When you have done no custom configuration in your Virtual Switch manager, Docker for Windows will
use the ``Default Switch`` automatically.
.. include:: /_includes/figures/xdebug/windows/virtual-switch-manager.rst
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``New Virtual Switch`` (e.g.: ``192.168.0.12``)
3. Look for the IP4 address in ``Default Switch`` (e.g.: ``192.168.0.12``)
.. include:: /_includes/figures/xdebug/windows/ipconfig.rst

@ -36,41 +36,14 @@ Gather Host IP address
On Windows you will have to manually retrieve the IP address to which Xdebug should connect to
via ``xdebug.remote_host``.
When gathering the Windows host IP address you will need to distinguish between two cases depending
on your configuration:
1. DockerNat IP address (no custom configuration applied)
2. Virtual Switch IP address (you have created a Virtual Switch to allow Internet access to your container)
Only one of the options may be valid for your setup.
DockerNAT IP address
^^^^^^^^^^^^^^^^^^^^
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``DockerNAT`` (e.g.: ``192.168.0.12``)
.. important::
``192.168.0.12`` is meant as an example and will eventually differ on your system.
Ensure you substitute it with the correct IP address.
.. seealso:: :ref:`howto_open_terminal_on_win`
Virtual Switch IP address
^^^^^^^^^^^^^^^^^^^^^^^^^
When you have created a custom Virtual Switch for you Docker setup, you will have to gather the
Virtual Switch IP address instead of the DockerNat IP address.
Let's assume you have created the switch by the name **New Virtual Switch** as follows:
When you have done no custom configuration in your Virtual Switch manager, Docker for Windows will
use the ``Default Switch`` automatically.
.. include:: /_includes/figures/xdebug/windows/virtual-switch-manager.rst
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``New Virtual Switch`` (e.g.: ``192.168.0.12``)
3. Look for the IP4 address in ``Default Switch`` (e.g.: ``192.168.0.12``)
.. include:: /_includes/figures/xdebug/windows/ipconfig.rst

@ -36,41 +36,14 @@ Gather Host IP address
On Windows you will have to manually retrieve the IP address to which Xdebug should connect to
via ``xdebug.remote_host``.
When gathering the Windows host IP address you will need to distinguish between two cases depending
on your configuration:
1. DockerNat IP address (no custom configuration applied)
2. Virtual Switch IP address (you have created a Virtual Switch to allow Internet access to your container)
Only one of the options may be valid for your setup.
DockerNAT IP address
^^^^^^^^^^^^^^^^^^^^
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``DockerNAT`` (e.g.: ``192.168.0.12``)
.. important::
``192.168.0.12`` is meant as an example and will eventually differ on your system.
Ensure you substitute it with the correct IP address.
.. seealso:: :ref:`howto_open_terminal_on_win`
Virtual Switch IP address
^^^^^^^^^^^^^^^^^^^^^^^^^
When you have created a custom Virtual Switch for you Docker setup, you will have to gather the
Virtual Switch IP address instead of the DockerNat IP address.
Let's assume you have created the switch by the name **New Virtual Switch** as follows:
When you have done no custom configuration in your Virtual Switch manager, Docker for Windows will
use the ``Default Switch`` automatically.
.. include:: /_includes/figures/xdebug/windows/virtual-switch-manager.rst
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``New Virtual Switch`` (e.g.: ``192.168.0.12``)
3. Look for the IP4 address in ``Default Switch`` (e.g.: ``192.168.0.12``)
.. include:: /_includes/figures/xdebug/windows/ipconfig.rst

@ -36,41 +36,14 @@ Gather Host IP address
On Windows you will have to manually retrieve the IP address to which Xdebug should connect to
via ``xdebug.remote_host``.
When gathering the Windows host IP address you will need to distinguish between two cases depending
on your configuration:
1. DockerNat IP address (no custom configuration applied)
2. Virtual Switch IP address (you have created a Virtual Switch to allow Internet access to your container)
Only one of the options may be valid for your setup.
DockerNAT IP address
^^^^^^^^^^^^^^^^^^^^
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``DockerNAT`` (e.g.: ``192.168.0.12``)
.. important::
``192.168.0.12`` is meant as an example and will eventually differ on your system.
Ensure you substitute it with the correct IP address.
.. seealso:: :ref:`howto_open_terminal_on_win`
Virtual Switch IP address
^^^^^^^^^^^^^^^^^^^^^^^^^
When you have created a custom Virtual Switch for you Docker setup, you will have to gather the
Virtual Switch IP address instead of the DockerNat IP address.
Let's assume you have created the switch by the name **New Virtual Switch** as follows:
When you have done no custom configuration in your Virtual Switch manager, Docker for Windows will
use the ``Default Switch`` automatically.
.. include:: /_includes/figures/xdebug/windows/virtual-switch-manager.rst
1. Open command line
2. Enter ``ipconfig``
3. Look for the IP4 address in ``New Virtual Switch`` (e.g.: ``192.168.0.12``)
3. Look for the IP4 address in ``Default Switch`` (e.g.: ``192.168.0.12``)
.. include:: /_includes/figures/xdebug/windows/ipconfig.rst
@ -137,7 +110,7 @@ You will need to configure the path mapping in ``launch.json`` (VSCode configura
"request": "launch",
"port": 9000,
"pathMappings": {
"/shared/httpd/mytest/htdocs": "${workspaceFolder}/htdocs"
"/shared/httpd/mytest/htdocs": "${workspaceRoot}/htdocs"
}
}, {
"name": "Launch currently open script",

@ -171,71 +171,36 @@ See the following table for a few examples:
IP address mappings
-------------------
The following table shows a mapping of IP addresses of available service from the perspective
of your host operating system and from within the PHP container.
The following table shows a mapping of IP addresses and hostnames. In other words, when you are inside
the PHP container, you can reach the services via the below defined IP addresses or hostnames:
+--------------+-----------------+------------------------------+
| Service | IP from host os | IP from within PHP container |
+==============+=================+==============================+
| PHP | ``127.0.0.1`` | ``127.0.0.1`` |
+--------------+-----------------+------------------------------+
| Apache/Nginx | ``127.0.0.1`` | ``127.0.0.1`` |
+--------------+-----------------+------------------------------+
| MySQL | ``127.0.0.1`` | ``127.0.0.1`` |
+--------------+-----------------+------------------------------+
| PostgreSQL | ``127.0.0.1`` | ``127.0.0.1`` |
+--------------+-----------------+------------------------------+
| Redis | ``127.0.0.1`` | ``127.0.0.1`` |
+--------------+-----------------+------------------------------+
| Memcached | ``127.0.0.1`` | ``127.0.0.1`` |
+--------------+-----------------+------------------------------+
| MongoDB | ``127.0.0.1`` | ``127.0.0.1`` |
+--------------+-----------------+------------------------------+
.. include:: /_includes/snippets/core-container.rst
As you can see, everyhing is available under ``127.0.0.1``.
.. note:: It is recommended to use hostnames as they can be remembered much easiert.
The PHP container is using ``socat`` to forward the services from all other available containers
to its own ``127.0.0.1`` address.
An example to access the MySQL database from either host or within the PHP container is the same:
An example to access the MySQL database from within the PHP container:
.. code-block:: bash
# Access MySQL from your host operating system
host> mysql -h 127.0.0.1
host> mysql -h 127.0.0.1 -u root -p
# Access MySQL from within the PHP container
devilbox@php-7.0.19 in /shared/httpd $ mysql -h 127.0.0.1
.. important::
Do not use ``localhost`` to access the services, it does not map to ``127.0.0.1`` on
all cases.
devilbox@php-7.0.19 in /shared/httpd $ mysql -h mysql -u root -p
So when setting up a configuration file from your PHP project you would for example use
``127.0.0.`` as the host for your MySQL database connection:
``mysql`` as the host for your MySQL database connection:
.. code-block:: php
<?php
// MySQL server connection
mysql_host = '127.0.0.1';
mysql_host = 'mysql';
mysql_port = '3306';
mysql_user = 'someusername';
mysql_pass = 'somepassword';
?>
Imagine your PHP framework ships a command line tool to run database migration. You could run
it from your host operating system or from within the PHP container. It would work from both
sides as the connection to the database is exactly the same locally or within the container.
You could also even switch between the Devilbox and a locally installed LAMP stack
and still use the same configuration.
.. important::
The mapping of ``127.0.0.1`` to your host operating system does not work with
Docker Toolbox out of the box. In order to achieve the same behaviour read up on:
:ref:`howto_docker_toolbox_and_the_devilbox`.
Port mappings
-------------
@ -283,7 +248,5 @@ Checklist
2. You know how to become root inside the PHP container
3. You know how to leave the container
4. You know that file and directory permissions are synronized
5. You know that ``127.0.0.1`` is available on your host and inside the PHP container
6. You know that ports are the same inside the container and on your host os
7. You know that project urls are available inside the container and on your host
8. You know about the limitations of :ref:`howto_docker_toolbox_and_the_devilbox`
5. You know by what hostnames you can reach a specific service
6. You know that project urls are available inside the container and on your host

@ -18,25 +18,7 @@ Core container
These container are well integrated into the Devilbox intranet and are considered core container:
+---------------------------+-------+----------+----------------+
| Container | Name | Hostname | IP Address |
+===========================+=======+==========+================+
| DNS | bind | bind | 172.16.238.100 |
+---------------------------+-------+----------+----------------+
| PHP | php | php | 172.16.238.10 |
+---------------------------+-------+----------+----------------+
| Apache, Nginx | httpd | httpd | 172.16.238.11 |
+---------------------------+-------+----------+----------------+
| MySQL, MariaDB, PerconaDB | mysql | mysql | 172.16.238.12 |
+---------------------------+-------+----------+----------------+
| PostgreSQL | pgsql | pgsql | 172.16.238.13 |
+---------------------------+-------+----------+----------------+
| Redis | redis | redis | 172.16.238.14 |
+---------------------------+-------+----------+----------------+
| Memcached | memcd | memcd | 172.16.238.15 |
+---------------------------+-------+----------+----------------+
| MongoDB | mongo | mongo | 172.16.238.16 |
+---------------------------+-------+----------+----------------+
.. include:: /_includes/snippets/core-container.rst
Additional container

@ -91,6 +91,8 @@ The PHP container is your workhorse and these are your tools:
+----------------------+---------------------------------------+
| ``tig`` | |ext_lnk_tool_tig| |
+----------------------+---------------------------------------+
| ``vue`` | |ext_lnk_tool_vue| |
+----------------------+---------------------------------------+
| ``webpack`` | |ext_lnk_tool_webpack| |
+----------------------+---------------------------------------+
| ``wp`` | |ext_lnk_tool_wp| |