From a6c45353bd76a3ba471f0a00a81c15e7a49dd4d6 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 14 Apr 2022 11:28:54 +0200 Subject: [PATCH 1/4] Adding PHP-FPM community images --- compose/docker-compose.override.yml-all | 6 + .../docker-compose.override.yml-php-community | 11 ++ docs/_includes/links/documentation.rst | 12 ++ .../snippets/additional-container.rst | 2 + .../docker-compose-override-tree-view.rst | 1 + .../custom-container/enable-all-container.rst | 1 + .../custom-container/enable-php-community.rst | 135 ++++++++++++++++++ docs/index.rst | 1 + 8 files changed, 169 insertions(+) create mode 100644 compose/docker-compose.override.yml-php-community create mode 100644 docs/custom-container/enable-php-community.rst diff --git a/compose/docker-compose.override.yml-all b/compose/docker-compose.override.yml-all index 9fe7d70a..eb558833 100644 --- a/compose/docker-compose.override.yml-all +++ b/compose/docker-compose.override.yml-all @@ -7,6 +7,12 @@ version: '2.3' ### services: + # ----------------------------------------------------------------------------------------------- + # PHP Community image + # ----------------------------------------------------------------------------------------------- + php: + image: devilbox/php-fpm-community:${PHP_SERVER}-${PHP_COMMUNITY_FLAVOUR:-devilbox} + # ----------------------------------------------------------------------------------------------- # Blackfire # ----------------------------------------------------------------------------------------------- diff --git a/compose/docker-compose.override.yml-php-community b/compose/docker-compose.override.yml-php-community new file mode 100644 index 00000000..6bd8149d --- /dev/null +++ b/compose/docker-compose.override.yml-php-community @@ -0,0 +1,11 @@ +# vim: set ft=yaml: +--- +version: '2.3' + +services: + + # ----------------------------------------------------------------------------------------------- + # PHP Community image + # ----------------------------------------------------------------------------------------------- + php: + image: devilbox/php-fpm-community:${PHP_SERVER}-${PHP_COMMUNITY_FLAVOUR:-devilbox} diff --git a/docs/_includes/links/documentation.rst b/docs/_includes/links/documentation.rst index 8368b41a..4bb7f84e 100644 --- a/docs/_includes/links/documentation.rst +++ b/docs/_includes/links/documentation.rst @@ -34,6 +34,18 @@ Github: MailHog +.. |ext_lnk_php_community_dockerhub| raw:: html + + + Dockerhub: PHP-FPM Community + + +.. |ext_lnk_php_community_github| raw:: html + + + Github: PHP-FPM Community + + .. |ext_lnk_mailhog_dockerhub| raw:: html diff --git a/docs/_includes/snippets/additional-container.rst b/docs/_includes/snippets/additional-container.rst index 49ca2302..4494a90a 100644 --- a/docs/_includes/snippets/additional-container.rst +++ b/docs/_includes/snippets/additional-container.rst @@ -1,6 +1,8 @@ +-------------------------------------+-----------+-----------+----------------+ | Container | Name | Hostname | IP Address | +=====================================+===========+===========+================+ +| PHP Community | php | php | 172.16.238.10 | ++-------------------------------------+-----------+-----------+----------------+ | Blackfire | blackfire | blackfire | 172.16.238.200 | +-------------------------------------+-----------+-----------+----------------+ | MailHog | mailhog | mailhog | 172.16.238.201 | diff --git a/docs/_includes/snippets/docker-compose-override-tree-view.rst b/docs/_includes/snippets/docker-compose-override-tree-view.rst index 9c02fb20..61d1f0cc 100644 --- a/docs/_includes/snippets/docker-compose-override-tree-view.rst +++ b/docs/_includes/snippets/docker-compose-override-tree-view.rst @@ -13,6 +13,7 @@ However, each example also exists in its standalone file as shown below: ├── docker-compose.override.yml-elk ├── docker-compose.override.yml-mailhog ├── docker-compose.override.yml-ngrok + ├── docker-compose.override.yml-php-community ├── docker-compose.override.yml-python-flask ├── docker-compose.override.yml-rabbitmq ├── docker-compose.override.yml-solr diff --git a/docs/custom-container/enable-all-container.rst b/docs/custom-container/enable-all-container.rst index 7d8d3381..46084087 100644 --- a/docs/custom-container/enable-all-container.rst +++ b/docs/custom-container/enable-all-container.rst @@ -56,6 +56,7 @@ That includes, but is not limited to: In order to fully customize each container, refer to their own documentation section: .. seealso:: + * :ref:`custom_container_enable_php_community` * :ref:`custom_container_enable_blackfire` * :ref:`custom_container_enable_elk_stack` * :ref:`custom_container_enable_mailhog` diff --git a/docs/custom-container/enable-php-community.rst b/docs/custom-container/enable-php-community.rst new file mode 100644 index 00000000..6e98110d --- /dev/null +++ b/docs/custom-container/enable-php-community.rst @@ -0,0 +1,135 @@ +.. include:: /_includes/all.rst +.. include:: /_includes/snippets/__ANNOUNCEMENTS__.rst + +.. _custom_container_enable_php_community: + +********************************** +Enable and configure PHP Community +********************************** + +This section will guide you through getting PHP community images integrated into the Devilbox. + +.. seealso:: + * |ext_lnk_php_community_github| + * |ext_lnk_php_community_dockerhub| + * :ref:`custom_container_enable_all_additional_container` + * :ref:`docker_compose_override_yml_how_does_it_work` + + +**Table of Contents** + +.. contents:: :local: + + +Overview +======== + +Available overwrites +-------------------- + +.. include:: /_includes/snippets/docker-compose-override-tree-view.rst + + +PHP-FPM Community settings +-------------------------- + +In case of PHP-FPM Community, the file is ``compose/docker-compose.override.yml-php-community``. This file +must be copied into the root of the Devilbox git directory. + ++-----------------------+-----------------------------------------------------------------------------------------------------------+ +| What | How and where | ++=======================+===========================================================================================================+ +| Example compose file | ``compose/docker-compose.override.yml-all`` or |br| ``compose/docker-compose.override.yml-php-community`` | ++-----------------------+-----------------------------------------------------------------------------------------------------------+ +| Container IP address | ``172.16.238.10`` | ++-----------------------+-----------------------------------------------------------------------------------------------------------+ +| Container host name | ``php`` | ++-----------------------+-----------------------------------------------------------------------------------------------------------+ +| Container name | ``php`` | ++-----------------------+-----------------------------------------------------------------------------------------------------------+ +| Mount points | Same as default php image | ++-----------------------+-----------------------------------------------------------------------------------------------------------+ +| Exposed port | Same as default php image | ++-----------------------+-----------------------------------------------------------------------------------------------------------+ +| Available at | n.a. | ++-----------------------+-----------------------------------------------------------------------------------------------------------+ +| Further configuration | ``PHP_COMMUNITY_FLAVOUR`` must be set via ``.env`` | ++-----------------------+-----------------------------------------------------------------------------------------------------------+ + +PHP Community env variables +--------------------------- + +Additionally the following ``.env`` variables can be created for easy configuration: + ++------------------------------+---------------+-------------------------------------------------------------------------+ +| Variable | Default value | Description | ++==============================+===============+=========================================================================+ +| ``PHP_COMMUNITY_FLAVOUR`` | ``devilbox`` | Controls the PHP Community flavour. | ++------------------------------+---------------+-------------------------------------------------------------------------+ + + +Instructions +============ + +1. Copy docker-compose.override.yml +----------------------------------- + +Copy the PHP-FPM Community Docker Compose overwrite file into the root of the Devilbox git directory. +(It must be at the same level as the default ``docker-compose.yml`` file). + +.. code-block:: bash + + host> cp compose/docker-compose.override.yml-php-community docker-compose.override.yml + +.. seealso:: + * :ref:`docker_compose_override_yml` + * :ref:`add_your_own_docker_image` + * :ref:`overwrite_existing_docker_image` + + +2. Adjust ``env`` settings +-------------------------- + +By default PHP-FPM Community is using the Devilbox reference flavour ``devilbox``. +You can change this flavour via the ``.env`` variable ``PHP_COMMUNITY_FLAVOUR``. + +.. code-block:: bash + :caption: .env + + PHP_COMMUNITY_FLAVOUR=devilbox + + +.. seealso:: :ref:`env_file` + + +3. Start the Devilbox +--------------------- + +The final step is to start the Devilbox with the newly added PHP-FPM Community images. + +Let's assume you want to start ``php``, ``httpd``, and ``bind``. + +.. code-block:: bash + + host> docker-compose up -d php httpd bind + +.. seealso:: :ref:`start_the_devilbox` + + +TL;DR +===== + +For the lazy readers, here are all commands required to get you started. +Simply copy and paste the following block into your terminal from the root of your Devilbox git +directory: + +.. code-block:: bash + + # Copy compose-override.yml into place + cp compose/docker-compose.override.yml-php-community docker-compose.override.yml + + # Set Community flavour + echo "PHP_COMMUNITY_FLAVOUR=devilbox" >> .env + + # Start container + docker-compose up -d php httpd bind diff --git a/docs/index.rst b/docs/index.rst index 742f5d6e..c0a9ebc1 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -118,6 +118,7 @@ host is ready to be served with your custom domain. :maxdepth: 2 custom-container/enable-all-container + custom-container/enable-php-community custom-container/enable-blackfire custom-container/enable-elk-stack custom-container/enable-mailhog From 59619ca9c15ade553833e0f7096b2cd189981b6d Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 14 Apr 2022 11:29:13 +0200 Subject: [PATCH 2/4] Update project files --- .devilbox/www/config.php | 4 ++-- CHANGELOG.md | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.devilbox/www/config.php b/.devilbox/www/config.php index 066eb38f..a726090d 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 = 'v2.1.1'; -$DEVILBOX_DATE = '2022-04-07'; +$DEVILBOX_VERSION = 'v2.2.0'; +$DEVILBOX_DATE = '2022-04-14'; $DEVILBOX_API_PAGE = 'devilbox-api/status.json'; // diff --git a/CHANGELOG.md b/CHANGELOG.md index 91c02ae8..29f5b8a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,15 @@ Make sure to have a look at [UPDATING.md](https://github.com/cytopia/devilbox/bl ## Unreleased +## Release v2.2.0 (2022-04-14) + +This release adds PHP-FPM community images via `docker-compose.override.yml`, which easily allows you +to build upon existing PHP images and customize them for your usecase/workflow. + +#### Added +- Added PHP-FPM Community images: https://github.com/devilbox/docker-php-fpm-community/ + + ## Release v2.1.1 (2022-04-07) #### Changed From 44d1f0162f3ae6e17abff3f45a2d189436e60bbb Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 14 Apr 2022 11:42:07 +0200 Subject: [PATCH 3/4] Add PHP-FPM community image to intranet credits --- .devilbox/www/htdocs/support.php | 43 +++++++++++++++++++------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/.devilbox/www/htdocs/support.php b/.devilbox/www/htdocs/support.php index 94765ec2..a44bec37 100644 --- a/.devilbox/www/htdocs/support.php +++ b/.devilbox/www/htdocs/support.php @@ -16,6 +16,7 @@

I am currently the sole creator and maintainer of the Devilbox and all of its required projects.
If you find this useful or if it makes your daily programming life easier, consider donating to keep this project alive.


@@ -39,55 +40,59 @@ docker-php-fpm-5.2 - Legacy PHP 5.2 base images (amd64 and i386) + Legacy PHP 5.2 base images (amd64 and i386) docker-php-fpm-5.3 - Legacy PHP 5.3 base images (amd64 and arm64) + Legacy PHP 5.3 base images (amd64 and arm64) docker-php-fpm-5.4 - Legacy PHP 5.4 base images (amd64 and arm64) + Legacy PHP 5.4 base images (amd64 and arm64) docker-php-fpm-5.5 - Legacy PHP 5.5 base images (amd64 and arm64) + Legacy PHP 5.5 base images (amd64 and arm64) docker-php-fpm-8.0 - PHP 8.0 base images (amd64 and arm64) + PHP 8.0 base images (amd64 and arm64) docker-php-fpm-8.1 - PHP 8.1 base images (amd64 and arm64) + PHP 8.1 base images (amd64 and arm64) docker-php-fpm-8.2 - Upcoming PHP 8.2 base images (amd64 and arm64) + PHP 8.2 base images (amd64 and arm64) docker-php-fpm - PHP-FPM Devilbox images + PHP-FPM Devilbox images (amd64 and arm64) + + + docker-php-fpm-community + PHP-FPM Community images (amd64 and arm64) docker-mysql - MySQL, MariaDB and PerconaDB images (amd64 and arm64) + MySQL, MariaDB and PerconaDB images (amd64 and arm64) docker-apache-2.2 - Apache 2.2 images (amd64 and arm64) + Apache 2.2 images (amd64 and arm64) docker-apache-2.4 - Apache 2.4 images (amd64 and arm64) + Apache 2.4 images (amd64 and arm64) docker-nginx-stable - Nginx stable images (amd64 and arm64) + Nginx stable images (amd64 and arm64) docker-nginx-mainline - Nginx mainline images (amd64 and arm64) + Nginx mainline images (amd64 and arm64) docker-haproxy @@ -95,7 +100,7 @@ docker-ngrok - Ngrok image + Ngrok image (amd64 and arm64) docker-varnish @@ -142,15 +147,19 @@ Re-usable GitHub Action Workflows - shell-command-retry-action + shell-command-retry GitHub Action - docker-tag-action + docker-tag GitHub Action - git-ref-matrix-action + git-ref-matrix + GitHub Action + + + upload-artifact-verify GitHub Action From daefd0f9277dafa39a3dfda705ea73d50d49b2be Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 14 Apr 2022 12:05:39 +0200 Subject: [PATCH 4/4] Add announcement in docs --- docs/_includes/snippets/__ANNOUNCEMENTS__.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/_includes/snippets/__ANNOUNCEMENTS__.rst b/docs/_includes/snippets/__ANNOUNCEMENTS__.rst index e69de29b..d5282294 100644 --- a/docs/_includes/snippets/__ANNOUNCEMENTS__.rst +++ b/docs/_includes/snippets/__ANNOUNCEMENTS__.rst @@ -0,0 +1,11 @@ +.. |ext_lnk_php_community_github_announce| raw:: html + + + PHP-FPM Community + + + + +.. attention:: + + You can now create your own **custom flavour** of PHP-FPM Community images and easily add them to the Devilbox: |ext_lnk_php_community_github_announce|