devilbox/docs/custom-container/enable-php-community.rst
2022-04-14 11:28:54 +02:00

5.8 KiB

Enable and configure PHP Community

This section will guide you through getting PHP community images integrated into the Devilbox.

* * * custom_container_enable_all_additional_container * docker_compose_override_yml_how_does_it_work

Table of Contents

local

Overview

Available overwrites

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 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).

host> cp compose/docker-compose.override.yml-php-community docker-compose.override.yml

* docker_compose_override_yml * add_your_own_docker_image * 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.

PHP_COMMUNITY_FLAVOUR=devilbox

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.

host> docker-compose up -d php httpd bind

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:

# 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