mirror of
https://github.com/cytopia/devilbox.git
synced 2025-01-31 08:25:23 +00:00
Merge pull request #470 from cytopia/documentation-blackfire
Blackfire improvements
This commit is contained in:
commit
4a43c155a7
@ -14,7 +14,7 @@ putenv('RES_OPTIONS=retrans:1 retry:1 timeout:1 attempts:1');
|
||||
|
||||
|
||||
$DEVILBOX_VERSION = 'v0.15';
|
||||
$DEVILBOX_DATE = '2019-01-12';
|
||||
$DEVILBOX_DATE = '2019-01-28';
|
||||
$DEVILBOX_API_PAGE = 'devilbox-api/status.json';
|
||||
|
||||
//
|
||||
|
@ -345,7 +345,7 @@ MODS="$( echo "${PHP52_MODS}, ${PHP53_MODS}, ${PHP54_MODS}, ${PHP55_MODS}, ${PHP
|
||||
###
|
||||
### Get disabled modules
|
||||
###
|
||||
DISABLED=",ioncube,$( grep -E '^PHP_MODULES_DISABLE=' "${SCRIPTPATH}/../env-example" | sed 's/.*=//g' ),"
|
||||
DISABLED=",blackfire,ioncube,$( grep -E '^PHP_MODULES_DISABLE=' "${SCRIPTPATH}/../env-example" | sed 's/.*=//g' ),"
|
||||
#echo $DISABLED
|
||||
B="✔" # Enabled base modules (cannot be disabled)
|
||||
E="🗸" # Enabled mods modules (can be disabled)
|
||||
|
@ -16,16 +16,15 @@ cd "${COMPOSEPATH}" && docker-compose exec -T php bash -c "find /startup.2.d/*.s
|
||||
echo "# ----------------------------------------------------------------------------------------"
|
||||
echo "# [TEST] ${f}"
|
||||
echo "# ----------------------------------------------------------------------------------------"
|
||||
if ! docker exec -t ${CONTAINER} bash "${f}" | grep -q "No projects defined"; then
|
||||
if ! docker exec -t ${CONTAINER} bash "${f}"; then
|
||||
sleep 5
|
||||
if ! docker exec -t ${CONTAINER} bash "${f}" | grep -q "No projects defined"; then
|
||||
if ! docker exec -t ${CONTAINER} bash "${f}"; then
|
||||
sleep 5
|
||||
if ! docker exec -t ${CONTAINER} bash "${f}" | grep -q "No projects defined"; then
|
||||
if ! docker exec -t ${CONTAINER} bash "${f}"; then
|
||||
sleep 5
|
||||
if ! docker exec -t ${CONTAINER} bash "${f}" | grep -q "No projects defined"; then
|
||||
if ! docker exec -t ${CONTAINER} bash "${f}"; then
|
||||
sleep 5
|
||||
if ! docker exec -t ${CONTAINER} bash "${f}" | grep -q "No projects defined"; then
|
||||
docker exec -t ${CONTAINER} bash "${f}" || true
|
||||
if ! docker exec -t ${CONTAINER} bash "${f}"; then
|
||||
echo "[FAIl] ${f}"
|
||||
exit 1
|
||||
fi
|
||||
@ -34,4 +33,6 @@ cd "${COMPOSEPATH}" && docker-compose exec -T php bash -c "find /startup.2.d/*.s
|
||||
fi
|
||||
fi
|
||||
echo "[OK] ${f}"
|
||||
echo
|
||||
echo
|
||||
done
|
||||
|
92
autostart/configure-blackfire-cli.sh-example
Executable file
92
autostart/configure-blackfire-cli.sh-example
Executable file
@ -0,0 +1,92 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
|
||||
###
|
||||
### Pre-flight check
|
||||
###
|
||||
if ! command -v blackfire >/dev/null 2>&1; then
|
||||
echo "No blackfire cli found, skipping configuration."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
###
|
||||
### Blackfire Client (cli) Variables
|
||||
###
|
||||
# Blackfire Client ID via env: BLACKFIRE_SERVER_ID
|
||||
BF_CLIENT_ID=
|
||||
# Blackfire Client Token via env: BLACKFIRE_SERVER_TOKEN
|
||||
BF_CLIENT_TOKEN=
|
||||
# Blackfire client configuration file
|
||||
BF_CLIENT_INI="/home/devilbox/.blackfire.ini"
|
||||
|
||||
###
|
||||
### Get Client ID and Client Token
|
||||
###
|
||||
if BF_CLIENT_ID="$( env | grep -Eo '^BLACKFIRE_CLIENT_ID=.*$' )"; then
|
||||
BF_CLIENT_ID="${BF_CLIENT_ID#*=}"
|
||||
fi
|
||||
|
||||
if BF_CLIENT_TOKEN="$( env | grep -Eo '^BLACKFIRE_CLIENT_TOKEN=.*$' )"; then
|
||||
BF_CLIENT_TOKEN="${BF_CLIENT_TOKEN#*=}"
|
||||
fi
|
||||
|
||||
|
||||
###
|
||||
### Create Client (cli) Config
|
||||
###
|
||||
{
|
||||
echo "[blackfire]";
|
||||
echo ";";
|
||||
echo "; This is a configuration file for Blackfire.";
|
||||
echo ";";
|
||||
echo "";
|
||||
echo ";";
|
||||
echo "; setting: ca-cert";
|
||||
echo "; desc : Sets the PEM encoded certificates to use";
|
||||
echo "; default:";
|
||||
echo "ca-cert=";
|
||||
echo "";
|
||||
echo ";";
|
||||
echo "; setting: client-id";
|
||||
echo "; desc : Sets the Client ID used for API authentication";
|
||||
echo "; default:";
|
||||
echo "client-id=${BF_CLIENT_ID}";
|
||||
echo "";
|
||||
echo ";";
|
||||
echo "; setting: client-token";
|
||||
echo "; desc : Sets the Client Token used for API authentication";
|
||||
echo "; default:";
|
||||
echo "client-token=${BF_CLIENT_TOKEN}";
|
||||
echo "";
|
||||
echo ";";
|
||||
echo "; setting: endpoint";
|
||||
echo "; desc : Sets the API endpoint";
|
||||
echo "; default: https://blackfire.io";
|
||||
echo "endpoint=https://blackfire.io";
|
||||
echo "";
|
||||
echo ";";
|
||||
echo "; setting: http-proxy";
|
||||
echo "; desc : Sets the HTTP proxy to use";
|
||||
echo "; default:";
|
||||
echo "http-proxy=";
|
||||
echo "";
|
||||
echo ";";
|
||||
echo "; setting: https-proxy";
|
||||
echo "; desc : Sets the HTTPS proxy to use";
|
||||
echo "; default:";
|
||||
echo "https-proxy=";
|
||||
echo "";
|
||||
echo ";";
|
||||
echo "; setting: timeout";
|
||||
echo "; desc : Sets the Blackfire API connection timeout";
|
||||
echo "; default: 15s";
|
||||
echo "timeout=15s";
|
||||
} > "${BF_CLIENT_INI}"
|
||||
|
||||
chown devilbox:devilbox "${BF_CLIENT_INI}"
|
||||
chmod 0600 "${BF_CLIENT_INI}"
|
@ -9,12 +9,13 @@
|
||||
|
||||
## Example files
|
||||
|
||||
This directory also holds two example files:
|
||||
This directory also holds three example files:
|
||||
|
||||
| File | Description |
|
||||
|----------------------------|-----------------------------------------|
|
||||
| `devilbox-php.ini-default` | Represents current PHP default settings |
|
||||
| `devilbox-php.ini-xdebug ` | Example settings for Xdebug |
|
||||
| File | Description |
|
||||
|------------------------------|-----------------------------------------|
|
||||
| `devilbox-php.ini-blackfire` | Blackfire configuration |
|
||||
| `devilbox-php.ini-default` | Represents current PHP default settings |
|
||||
| `devilbox-php.ini-xdebug ` | Example settings for Xdebug |
|
||||
|
||||
* Do not edit these example files!
|
||||
* Copy them to a new file (in case you want to use them)
|
||||
|
52
cfg/php-ini-5.6/devilbox-php.ini-blackfire
Normal file
52
cfg/php-ini-5.6/devilbox-php.ini-blackfire
Normal file
@ -0,0 +1,52 @@
|
||||
; ############################################################
|
||||
; # Devilbox php.ini: Blackfire example
|
||||
; ############################################################
|
||||
;
|
||||
; Information
|
||||
; -----------
|
||||
; * Do not edit this file (it belongs to git)
|
||||
; * This file show a possible Xdebug example configuration
|
||||
; * If this file is enabled, it will overwrite the current Xdebug settings
|
||||
;
|
||||
; How to enable?
|
||||
; --------------
|
||||
; * Copy this file to another file with ".ini" extension
|
||||
; * Only files with ".ini" extensions will be applied by PHP
|
||||
;
|
||||
; IMPORTANT
|
||||
; ---------
|
||||
; * Ensure that blackfire is enabled in .env via: PHP_MODULES_ENABLE=blackfire
|
||||
; * Ensure that Xdebug is disabled in .env via: PHP_MODULES_DISABLE=xdebug
|
||||
|
||||
|
||||
;
|
||||
; blackfire.ini configuration
|
||||
;
|
||||
[blackfire]
|
||||
|
||||
; Sets the socket where the agent is listening.
|
||||
; Possible value can be a unix socket or a TCP address.
|
||||
; Defaults to unix:///var/run/blackfire/agent.sock on Linux,
|
||||
; unix:///usr/local/var/run/blackfire-agent.sock on MacOSX,
|
||||
; and to tcp://127.0.0.1:8307 on Windows.
|
||||
blackfire.agent_socket = tcp://blackfire:8707
|
||||
|
||||
blackfire.agent_timeout = 0.25
|
||||
|
||||
; Log verbosity level (4: debug, 3: info, 2: warning, 1: error)
|
||||
blackfire.log_level = 4
|
||||
|
||||
; Log file (STDERR by default)
|
||||
blackfire.log_file = /var/log/php/blackfire.log
|
||||
|
||||
; Sets fine-grained configuration for Probe.
|
||||
; This should be left blank in most cases. For most installs,
|
||||
; the server credentials should only be set in the agent.
|
||||
;blackfire.server_id =
|
||||
|
||||
; Sets fine-grained configuration for Probe.
|
||||
; This should be left blank in most cases. For most installs,
|
||||
; the server credentials should only be set in the agent.
|
||||
;blackfire.server_token =
|
||||
|
||||
; vim: set ft=dosini:
|
@ -9,12 +9,13 @@
|
||||
|
||||
## Example files
|
||||
|
||||
This directory also holds two example files:
|
||||
This directory also holds three example files:
|
||||
|
||||
| File | Description |
|
||||
|----------------------------|-----------------------------------------|
|
||||
| `devilbox-php.ini-default` | Represents current PHP default settings |
|
||||
| `devilbox-php.ini-xdebug ` | Example settings for Xdebug |
|
||||
| File | Description |
|
||||
|------------------------------|-----------------------------------------|
|
||||
| `devilbox-php.ini-blackfire` | Blackfire configuration |
|
||||
| `devilbox-php.ini-default` | Represents current PHP default settings |
|
||||
| `devilbox-php.ini-xdebug ` | Example settings for Xdebug |
|
||||
|
||||
* Do not edit these example files!
|
||||
* Copy them to a new file (in case you want to use them)
|
||||
|
52
cfg/php-ini-7.0/devilbox-php.ini-blackfire
Normal file
52
cfg/php-ini-7.0/devilbox-php.ini-blackfire
Normal file
@ -0,0 +1,52 @@
|
||||
; ############################################################
|
||||
; # Devilbox php.ini: Blackfire example
|
||||
; ############################################################
|
||||
;
|
||||
; Information
|
||||
; -----------
|
||||
; * Do not edit this file (it belongs to git)
|
||||
; * This file show a possible Xdebug example configuration
|
||||
; * If this file is enabled, it will overwrite the current Xdebug settings
|
||||
;
|
||||
; How to enable?
|
||||
; --------------
|
||||
; * Copy this file to another file with ".ini" extension
|
||||
; * Only files with ".ini" extensions will be applied by PHP
|
||||
;
|
||||
; IMPORTANT
|
||||
; ---------
|
||||
; * Ensure that blackfire is enabled in .env via: PHP_MODULES_ENABLE=blackfire
|
||||
; * Ensure that Xdebug is disabled in .env via: PHP_MODULES_DISABLE=xdebug
|
||||
|
||||
|
||||
;
|
||||
; blackfire.ini configuration
|
||||
;
|
||||
[blackfire]
|
||||
|
||||
; Sets the socket where the agent is listening.
|
||||
; Possible value can be a unix socket or a TCP address.
|
||||
; Defaults to unix:///var/run/blackfire/agent.sock on Linux,
|
||||
; unix:///usr/local/var/run/blackfire-agent.sock on MacOSX,
|
||||
; and to tcp://127.0.0.1:8307 on Windows.
|
||||
blackfire.agent_socket = tcp://blackfire:8707
|
||||
|
||||
blackfire.agent_timeout = 0.25
|
||||
|
||||
; Log verbosity level (4: debug, 3: info, 2: warning, 1: error)
|
||||
blackfire.log_level = 4
|
||||
|
||||
; Log file (STDERR by default)
|
||||
blackfire.log_file = /var/log/php/blackfire.log
|
||||
|
||||
; Sets fine-grained configuration for Probe.
|
||||
; This should be left blank in most cases. For most installs,
|
||||
; the server credentials should only be set in the agent.
|
||||
;blackfire.server_id =
|
||||
|
||||
; Sets fine-grained configuration for Probe.
|
||||
; This should be left blank in most cases. For most installs,
|
||||
; the server credentials should only be set in the agent.
|
||||
;blackfire.server_token =
|
||||
|
||||
; vim: set ft=dosini:
|
@ -9,12 +9,13 @@
|
||||
|
||||
## Example files
|
||||
|
||||
This directory also holds two example files:
|
||||
This directory also holds three example files:
|
||||
|
||||
| File | Description |
|
||||
|----------------------------|-----------------------------------------|
|
||||
| `devilbox-php.ini-default` | Represents current PHP default settings |
|
||||
| `devilbox-php.ini-xdebug ` | Example settings for Xdebug |
|
||||
| File | Description |
|
||||
|------------------------------|-----------------------------------------|
|
||||
| `devilbox-php.ini-blackfire` | Blackfire configuration |
|
||||
| `devilbox-php.ini-default` | Represents current PHP default settings |
|
||||
| `devilbox-php.ini-xdebug ` | Example settings for Xdebug |
|
||||
|
||||
* Do not edit these example files!
|
||||
* Copy them to a new file (in case you want to use them)
|
||||
|
52
cfg/php-ini-7.1/devilbox-php.ini-blackfire
Normal file
52
cfg/php-ini-7.1/devilbox-php.ini-blackfire
Normal file
@ -0,0 +1,52 @@
|
||||
; ############################################################
|
||||
; # Devilbox php.ini: Blackfire example
|
||||
; ############################################################
|
||||
;
|
||||
; Information
|
||||
; -----------
|
||||
; * Do not edit this file (it belongs to git)
|
||||
; * This file show a possible Xdebug example configuration
|
||||
; * If this file is enabled, it will overwrite the current Xdebug settings
|
||||
;
|
||||
; How to enable?
|
||||
; --------------
|
||||
; * Copy this file to another file with ".ini" extension
|
||||
; * Only files with ".ini" extensions will be applied by PHP
|
||||
;
|
||||
; IMPORTANT
|
||||
; ---------
|
||||
; * Ensure that blackfire is enabled in .env via: PHP_MODULES_ENABLE=blackfire
|
||||
; * Ensure that Xdebug is disabled in .env via: PHP_MODULES_DISABLE=xdebug
|
||||
|
||||
|
||||
;
|
||||
; blackfire.ini configuration
|
||||
;
|
||||
[blackfire]
|
||||
|
||||
; Sets the socket where the agent is listening.
|
||||
; Possible value can be a unix socket or a TCP address.
|
||||
; Defaults to unix:///var/run/blackfire/agent.sock on Linux,
|
||||
; unix:///usr/local/var/run/blackfire-agent.sock on MacOSX,
|
||||
; and to tcp://127.0.0.1:8307 on Windows.
|
||||
blackfire.agent_socket = tcp://blackfire:8707
|
||||
|
||||
blackfire.agent_timeout = 0.25
|
||||
|
||||
; Log verbosity level (4: debug, 3: info, 2: warning, 1: error)
|
||||
blackfire.log_level = 4
|
||||
|
||||
; Log file (STDERR by default)
|
||||
blackfire.log_file = /var/log/php/blackfire.log
|
||||
|
||||
; Sets fine-grained configuration for Probe.
|
||||
; This should be left blank in most cases. For most installs,
|
||||
; the server credentials should only be set in the agent.
|
||||
;blackfire.server_id =
|
||||
|
||||
; Sets fine-grained configuration for Probe.
|
||||
; This should be left blank in most cases. For most installs,
|
||||
; the server credentials should only be set in the agent.
|
||||
;blackfire.server_token =
|
||||
|
||||
; vim: set ft=dosini:
|
@ -9,12 +9,13 @@
|
||||
|
||||
## Example files
|
||||
|
||||
This directory also holds two example files:
|
||||
This directory also holds three example files:
|
||||
|
||||
| File | Description |
|
||||
|----------------------------|-----------------------------------------|
|
||||
| `devilbox-php.ini-default` | Represents current PHP default settings |
|
||||
| `devilbox-php.ini-xdebug ` | Example settings for Xdebug |
|
||||
| File | Description |
|
||||
|------------------------------|-----------------------------------------|
|
||||
| `devilbox-php.ini-blackfire` | Blackfire configuration |
|
||||
| `devilbox-php.ini-default` | Represents current PHP default settings |
|
||||
| `devilbox-php.ini-xdebug ` | Example settings for Xdebug |
|
||||
|
||||
* Do not edit these example files!
|
||||
* Copy them to a new file (in case you want to use them)
|
||||
|
52
cfg/php-ini-7.2/devilbox-php.ini-blackfire
Normal file
52
cfg/php-ini-7.2/devilbox-php.ini-blackfire
Normal file
@ -0,0 +1,52 @@
|
||||
; ############################################################
|
||||
; # Devilbox php.ini: Blackfire example
|
||||
; ############################################################
|
||||
;
|
||||
; Information
|
||||
; -----------
|
||||
; * Do not edit this file (it belongs to git)
|
||||
; * This file show a possible Xdebug example configuration
|
||||
; * If this file is enabled, it will overwrite the current Xdebug settings
|
||||
;
|
||||
; How to enable?
|
||||
; --------------
|
||||
; * Copy this file to another file with ".ini" extension
|
||||
; * Only files with ".ini" extensions will be applied by PHP
|
||||
;
|
||||
; IMPORTANT
|
||||
; ---------
|
||||
; * Ensure that blackfire is enabled in .env via: PHP_MODULES_ENABLE=blackfire
|
||||
; * Ensure that Xdebug is disabled in .env via: PHP_MODULES_DISABLE=xdebug
|
||||
|
||||
|
||||
;
|
||||
; blackfire.ini configuration
|
||||
;
|
||||
[blackfire]
|
||||
|
||||
; Sets the socket where the agent is listening.
|
||||
; Possible value can be a unix socket or a TCP address.
|
||||
; Defaults to unix:///var/run/blackfire/agent.sock on Linux,
|
||||
; unix:///usr/local/var/run/blackfire-agent.sock on MacOSX,
|
||||
; and to tcp://127.0.0.1:8307 on Windows.
|
||||
blackfire.agent_socket = tcp://blackfire:8707
|
||||
|
||||
blackfire.agent_timeout = 0.25
|
||||
|
||||
; Log verbosity level (4: debug, 3: info, 2: warning, 1: error)
|
||||
blackfire.log_level = 4
|
||||
|
||||
; Log file (STDERR by default)
|
||||
blackfire.log_file = /var/log/php/blackfire.log
|
||||
|
||||
; Sets fine-grained configuration for Probe.
|
||||
; This should be left blank in most cases. For most installs,
|
||||
; the server credentials should only be set in the agent.
|
||||
;blackfire.server_id =
|
||||
|
||||
; Sets fine-grained configuration for Probe.
|
||||
; This should be left blank in most cases. For most installs,
|
||||
; the server credentials should only be set in the agent.
|
||||
;blackfire.server_token =
|
||||
|
||||
; vim: set ft=dosini:
|
@ -9,12 +9,13 @@
|
||||
|
||||
## Example files
|
||||
|
||||
This directory also holds two example files:
|
||||
This directory also holds three example files:
|
||||
|
||||
| File | Description |
|
||||
|----------------------------|-----------------------------------------|
|
||||
| `devilbox-php.ini-default` | Represents current PHP default settings |
|
||||
| `devilbox-php.ini-xdebug ` | Example settings for Xdebug |
|
||||
| File | Description |
|
||||
|------------------------------|-----------------------------------------|
|
||||
| `devilbox-php.ini-blackfire` | Blackfire configuration |
|
||||
| `devilbox-php.ini-default` | Represents current PHP default settings |
|
||||
| `devilbox-php.ini-xdebug ` | Example settings for Xdebug |
|
||||
|
||||
* Do not edit these example files!
|
||||
* Copy them to a new file (in case you want to use them)
|
||||
|
52
cfg/php-ini-7.3/devilbox-php.ini-blackfire
Normal file
52
cfg/php-ini-7.3/devilbox-php.ini-blackfire
Normal file
@ -0,0 +1,52 @@
|
||||
; ############################################################
|
||||
; # Devilbox php.ini: Blackfire example
|
||||
; ############################################################
|
||||
;
|
||||
; Information
|
||||
; -----------
|
||||
; * Do not edit this file (it belongs to git)
|
||||
; * This file show a possible Xdebug example configuration
|
||||
; * If this file is enabled, it will overwrite the current Xdebug settings
|
||||
;
|
||||
; How to enable?
|
||||
; --------------
|
||||
; * Copy this file to another file with ".ini" extension
|
||||
; * Only files with ".ini" extensions will be applied by PHP
|
||||
;
|
||||
; IMPORTANT
|
||||
; ---------
|
||||
; * Ensure that blackfire is enabled in .env via: PHP_MODULES_ENABLE=blackfire
|
||||
; * Ensure that Xdebug is disabled in .env via: PHP_MODULES_DISABLE=xdebug
|
||||
|
||||
|
||||
;
|
||||
; blackfire.ini configuration
|
||||
;
|
||||
[blackfire]
|
||||
|
||||
; Sets the socket where the agent is listening.
|
||||
; Possible value can be a unix socket or a TCP address.
|
||||
; Defaults to unix:///var/run/blackfire/agent.sock on Linux,
|
||||
; unix:///usr/local/var/run/blackfire-agent.sock on MacOSX,
|
||||
; and to tcp://127.0.0.1:8307 on Windows.
|
||||
blackfire.agent_socket = tcp://blackfire:8707
|
||||
|
||||
blackfire.agent_timeout = 0.25
|
||||
|
||||
; Log verbosity level (4: debug, 3: info, 2: warning, 1: error)
|
||||
blackfire.log_level = 4
|
||||
|
||||
; Log file (STDERR by default)
|
||||
blackfire.log_file = /var/log/php/blackfire.log
|
||||
|
||||
; Sets fine-grained configuration for Probe.
|
||||
; This should be left blank in most cases. For most installs,
|
||||
; the server credentials should only be set in the agent.
|
||||
;blackfire.server_id =
|
||||
|
||||
; Sets fine-grained configuration for Probe.
|
||||
; This should be left blank in most cases. For most installs,
|
||||
; the server credentials should only be set in the agent.
|
||||
;blackfire.server_token =
|
||||
|
||||
; vim: set ft=dosini:
|
@ -8,6 +8,8 @@ services:
|
||||
environment:
|
||||
- BLACKFIRE_SERVER_ID=${BLACKFIRE_SERVER_ID:-id}
|
||||
- BLACKFIRE_SERVER_TOKEN=${BLACKFIRE_SERVER_TOKEN:-token}
|
||||
- BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID:-id}
|
||||
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN:-token}
|
||||
networks:
|
||||
app_net:
|
||||
ipv4_address: 172.16.238.200
|
||||
|
@ -7,6 +7,8 @@ services:
|
||||
environment:
|
||||
- BLACKFIRE_SERVER_ID=${BLACKFIRE_SERVER_ID:-id}
|
||||
- BLACKFIRE_SERVER_TOKEN=${BLACKFIRE_SERVER_TOKEN:-token}
|
||||
- BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID:-id}
|
||||
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN:-token}
|
||||
networks:
|
||||
app_net:
|
||||
ipv4_address: 172.16.238.200
|
||||
|
@ -1183,7 +1183,7 @@ Enable any non-standard PHP modules in a comma separated list.
|
||||
+------------------------+--------------------------------------+------------------+
|
||||
|
||||
.. note::
|
||||
Currently only ``ioncube`` is available to enable.
|
||||
Currently only ``ioncube`` and ``blackfire`` are available to enable.
|
||||
|
||||
Example:
|
||||
|
||||
@ -1194,6 +1194,33 @@ Example:
|
||||
# Enable ionCube
|
||||
PHP_MODULES_ENABLE=ioncube
|
||||
|
||||
# When enabling blackfire or ionCube you must also disable xdebug:
|
||||
# https://xdebug.org/docs/install#compat
|
||||
PHP_MODULES_DISABLE=xdebug
|
||||
|
||||
.. code-block:: bash
|
||||
:caption: .env
|
||||
:emphasize-lines: 2
|
||||
|
||||
# Enable blackfire
|
||||
PHP_MODULES_ENABLE=blackfire
|
||||
|
||||
# When enabling blackfire or ionCube you must also disable xdebug:
|
||||
# https://xdebug.org/docs/install#compat
|
||||
PHP_MODULES_DISABLE=xdebug
|
||||
|
||||
.. code-block:: bash
|
||||
:caption: .env
|
||||
:emphasize-lines: 2
|
||||
|
||||
# Enable both, blackfire and ionCube
|
||||
PHP_MODULES_ENABLE=blackfire,ioncube
|
||||
|
||||
# When enabling blackfire or ionCube you must also disable xdebug:
|
||||
# https://xdebug.org/docs/install#compat
|
||||
PHP_MODULES_DISABLE=xdebug
|
||||
|
||||
|
||||
.. _env_file_php_modules_disable:
|
||||
|
||||
PHP_MODULES_DISABLE
|
||||
@ -1201,11 +1228,11 @@ PHP_MODULES_DISABLE
|
||||
|
||||
Disable any PHP modules in a comma separated list.
|
||||
|
||||
+-------------------------+--------------------------------------+-------------------------------------------------------------+
|
||||
| Name | Allowed values | Default value |
|
||||
+=========================+======================================+=============================================================+
|
||||
| ``PHP_MODULES_DISABLE`` | comma separated list of module names | ``blackfire,oci8,PDO_OCI,pdo_sqlsrv,sqlsrv,rdkafka,swoole`` |
|
||||
+-------------------------+--------------------------------------+-------------------------------------------------------------+
|
||||
+-------------------------+--------------------------------------+---------------------------------------------------+
|
||||
| Name | Allowed values | Default value |
|
||||
+=========================+======================================+===================================================+
|
||||
| ``PHP_MODULES_DISABLE`` | comma separated list of module names | ``oci8,PDO_OCI,pdo_sqlsrv,sqlsrv,rdkafka,swoole`` |
|
||||
+-------------------------+--------------------------------------+---------------------------------------------------+
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -59,15 +59,19 @@ Blackfire env variables
|
||||
|
||||
Additionally the following ``.env`` variables can be created for easy configuration:
|
||||
|
||||
+------------------------------+---------------+---------------------------------------------------------------+
|
||||
| Variable | Default value | Description |
|
||||
+==============================+===============+===============================================================+
|
||||
| ``BLACKFIRE_SERVER_ID`` | ``id`` | A valid server id is required in order to use blackfire. |
|
||||
+------------------------------+---------------+---------------------------------------------------------------+
|
||||
| ``BLACKFIRE_SERVER_TOKEN`` | ``token`` | A valid server token is required in order to use blackfire. |
|
||||
+------------------------------+---------------+---------------------------------------------------------------+
|
||||
| ``BLACKFIRE_SERVER`` | ``latest`` | Controls the Blackfire version to use. |
|
||||
+------------------------------+---------------+---------------------------------------------------------------+
|
||||
+------------------------------+---------------+-------------------------------------------------------------------------+
|
||||
| Variable | Default value | Description |
|
||||
+==============================+===============+=========================================================================+
|
||||
| ``BLACKFIRE_SERVER`` | ``latest`` | Controls the Blackfire version to use. |
|
||||
+------------------------------+---------------+-------------------------------------------------------------------------+
|
||||
| ``BLACKFIRE_SERVER_ID`` | ``id`` | A valid server id is required in order to start ``blackfire-agent``. |
|
||||
+------------------------------+---------------+-------------------------------------------------------------------------+
|
||||
| ``BLACKFIRE_SERVER_TOKEN`` | ``token`` | A valid server token is required in order to start ``blackfire-agent``. |
|
||||
+------------------------------+---------------+-------------------------------------------------------------------------+
|
||||
| ``BLACKFIRE_CLIENT_ID`` | ``id`` | A valid client id is required in order to use ``blackfire`` cli. |
|
||||
+------------------------------+---------------+-------------------------------------------------------------------------+
|
||||
| ``BLACKFIRE_CLIENT_TOKEN`` | ``token`` | A valid client token is required in order to use ``blackfire`` cli. |
|
||||
+------------------------------+---------------+-------------------------------------------------------------------------+
|
||||
|
||||
|
||||
Instructions
|
||||
@ -89,8 +93,8 @@ Copy the Blackfire Docker Compose overwrite file into the root of the Devilbox g
|
||||
* :ref:`overwrite_existing_docker_image`
|
||||
|
||||
|
||||
2. Adjust ``env`` settings (required)
|
||||
-------------------------------------
|
||||
2. Adjust ``env`` settings
|
||||
--------------------------
|
||||
|
||||
By default Blackfire is using some dummy values for BLACKFIRE_SERVER_ID and BLACKFIRE_SERVER_TOKEN.
|
||||
You must however aquire valid values and set the in your ``.env`` file in order for Blackfire
|
||||
@ -113,10 +117,59 @@ to properly start. Those values can be obtained at their official webpage.
|
||||
#BLACKFIRE_SERVER=1.18.0
|
||||
BLACKFIRE_SERVER=latest
|
||||
|
||||
You must also explicitly enable the PHP ``blackfire`` module and disable ``xdebug`` via ``.env``
|
||||
|
||||
.. code-block:: bash
|
||||
:caption: .env
|
||||
|
||||
PHP_MODULES_ENABLE=blackfire
|
||||
PHP_MODULES_DISABLE=xdebug
|
||||
|
||||
.. seealso:: :ref:`env_file`
|
||||
|
||||
|
||||
3. Start the Devilbox
|
||||
3. Copy blackfire php.ini template
|
||||
----------------------------------
|
||||
|
||||
In order for the PHP ``blackfire`` module to know where the ``blackfire-agent`` is listening,
|
||||
we must configure its PHP settings. There is already a default template that you can simply copy.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
host> cp cfg/php-ini-7.2/devilbox-php.ini-blackfire cfg/php-ini-7.2/blackfire.ini
|
||||
|
||||
.. seealso::
|
||||
The above example shows the procedure for PHP 7.2, if you are using a different version,
|
||||
you must navigate to its corresponding configuration directory.
|
||||
|
||||
Read more here: :ref:`php_ini`
|
||||
|
||||
|
||||
4. Configure blackfire cli (optional)
|
||||
-------------------------------------
|
||||
|
||||
If you want to use the ``blackfire`` cli from within the PHP container, its configuration must be
|
||||
configured. There is already a startup template which does it for you.
|
||||
|
||||
You first need to add the Blackfire client id and token to ``.env``:
|
||||
|
||||
.. code-block:: bash
|
||||
:caption: .env
|
||||
|
||||
BLACKFIRE_CLIENT_ID=<valid client id>
|
||||
BLACKFIRE_CLIENT_TOKEN=<valid client token>
|
||||
|
||||
Then all that's left to do is to copy the startup script which configures the blackfire cli for you.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
host> cp autostart/configure-blackfire-cli.sh-example autostart/configure-blackfire-cli.sh
|
||||
|
||||
.. seealso::
|
||||
* :ref:`custom_scripts_globally`
|
||||
|
||||
|
||||
5. Start the Devilbox
|
||||
---------------------
|
||||
|
||||
The final step is to start the Devilbox with Blackfire.
|
||||
@ -142,10 +195,17 @@ directory:
|
||||
# Copy compose-override.yml into place
|
||||
cp compose/docker-compose.override.yml-blackfire docker-compose.override.yml
|
||||
|
||||
# Create .env variable
|
||||
# Copy php.ini into place
|
||||
cp cfg/php-ini-7.2/devilbox-php.ini-blackfire cfg/php-ini-7.2/blackfire.ini
|
||||
|
||||
# Set Blackfire server id and token
|
||||
echo "BLACKFIRE_SERVER_ID=<valid server id>" >> .env
|
||||
echo "BLACKFIRE_SERVER_TOKEN=<valid server token>" >> .env
|
||||
|
||||
# Set Blackfire client id and token
|
||||
echo "BLACKFIRE_CLIENT_ID=<valid client id>" >> .env
|
||||
echo "BLACKFIRE_CLIENT_TOKEN=<valid client token>" >> .env
|
||||
|
||||
echo "#BLACKFIRE_SERVER=1.12.0" >> .env
|
||||
echo "#BLACKFIRE_SERVER=1.13.0" >> .env
|
||||
echo "#BLACKFIRE_SERVER=1.14.0" >> .env
|
||||
@ -157,5 +217,12 @@ directory:
|
||||
echo "#BLACKFIRE_SERVER=1.18.0" >> .env
|
||||
echo "BLACKFIRE_SERVER=latest" >> .env
|
||||
|
||||
# Ensure blackfire is enabled and xdebug is disabled
|
||||
# IMPORTANT: This replacement is only an example and will overwrite
|
||||
# all other enabled/disabled modules.
|
||||
# Do not do it this way.
|
||||
sed -i'' 's/^PHP_MODULES_ENABLE=.*/PHP_MODULES_ENABLE=blackfire/g' .env
|
||||
sed -i'' 's/^PHP_MODULES_DISABLE=.*/PHP_MODULES_ENABLE=xdebug/g' .env
|
||||
|
||||
# Start container
|
||||
docker-compose up -d php httpd bind blackfire
|
||||
|
@ -458,9 +458,11 @@ HOST_PATH_MONGO_DATADIR=./data/mongo
|
||||
###
|
||||
### Enable certain PHP modules which are not enabled by default
|
||||
###
|
||||
### Currently the only module that can be enabled is 'ioncube'
|
||||
### Currently the only modules that can be enabled are 'ioncube' and 'blackfire'
|
||||
### Also ensure to disable xdebug when using any of the above:
|
||||
### https://xdebug.org/docs/install#compat
|
||||
###
|
||||
### PHP_MODULES_ENABLE=ioncube
|
||||
### PHP_MODULES_ENABLE=ioncube, blackfire
|
||||
###
|
||||
PHP_MODULES_ENABLE=
|
||||
|
||||
@ -472,7 +474,7 @@ PHP_MODULES_ENABLE=
|
||||
###
|
||||
### PHP_MODULES_DISABLE=xdebug,imagick,swoole
|
||||
###
|
||||
PHP_MODULES_DISABLE=blackfire,oci8,PDO_OCI,pdo_sqlsrv,sqlsrv,rdkafka,swoole
|
||||
PHP_MODULES_DISABLE=oci8,PDO_OCI,pdo_sqlsrv,sqlsrv,rdkafka,swoole
|
||||
|
||||
|
||||
###
|
||||
|
Loading…
x
Reference in New Issue
Block a user