Added blackfire.io

This commit is contained in:
Diego Antunes 2017-04-21 10:02:54 +12:00
parent a7624a7034
commit 5aab3add44
9 changed files with 120 additions and 1 deletions

View File

@ -93,7 +93,7 @@ PHP FPM - HHVM
- **Message Queuing:** - **Message Queuing:**
Beanstalkd - Beanstalkd Console - RabbitMQ - RabbitMQ Console - PHP Worker Beanstalkd - Beanstalkd Console - RabbitMQ - RabbitMQ Console - PHP Worker
- **Tools:** - **Tools:**
HAProxy - Jenkins - ElasticSearch - Selenium - Certbot - Mailhog - Minio - Varnish - PhpMyAdmin - Adminer - PgAdmin - MailHog... HAProxy - Jenkins - ElasticSearch - Selenium - Certbot - Mailhog - Minio - Varnish - PhpMyAdmin - Adminer - PgAdmin - MailHog - [Blackfire](https://blackfire.io)...
Laradock introduces the **Workspace** Image, as a development environment. Laradock introduces the **Workspace** Image, as a development environment.
It contains a rich set of helpful tools, all pre-configured to work and integrate with almost any combination of Containers and tools you may choose. It contains a rich set of helpful tools, all pre-configured to work and integrate with almost any combination of Containers and tools you may choose.

View File

@ -16,6 +16,7 @@ services:
context: ./workspace context: ./workspace
args: args:
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG} - INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP} - INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
- INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO} - INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE} - INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
@ -34,6 +35,8 @@ services:
- NODE_VERSION=${WORKSPACE_NODE_VERSION} - NODE_VERSION=${WORKSPACE_NODE_VERSION}
- YARN_VERSION=${WORKSPACE_YARN_VERSION} - YARN_VERSION=${WORKSPACE_YARN_VERSION}
- TZ=${WORKSPACE_TIMEZONE} - TZ=${WORKSPACE_TIMEZONE}
- BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
dockerfile: "Dockerfile-${PHP_VERSION}" dockerfile: "Dockerfile-${PHP_VERSION}"
volumes_from: volumes_from:
- applications - applications
@ -53,6 +56,7 @@ services:
context: ./php-fpm context: ./php-fpm
args: args:
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG} - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
- INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP} - INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP}
- INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO} - INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO}
- INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE} - INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE}
@ -115,6 +119,18 @@ services:
- frontend - frontend
- backend - backend
### Blackfire Container #################################
blackfire:
image: blackfire/blackfire
environment:
- BLACKFIRE_SERVER_ID=${BLACKFIRE_SERVER_ID}
- BLACKFIRE_SERVER_TOKEN=${BLACKFIRE_SERVER_TOKEN}
depends_on:
- php-fpm
networks:
- backend
### Apache Server Container ################################# ### Apache Server Container #################################
apache2: apache2:

View File

@ -58,6 +58,16 @@ NGINX_HOST_HTTPS_PORT=443
NGINX_HOST_LOG_PATH=./logs/nginx/ NGINX_HOST_LOG_PATH=./logs/nginx/
NGINX_SITES_PATH=./nginx/sites/ NGINX_SITES_PATH=./nginx/sites/
### Blackfire Container
# Create an account on blackfire.io
# Don't enable blackfire and xDebug at the same time
# see https://blackfire.io/docs/24-days/06-installation#install-probe-debian
INSTALL_BLACKFIRE=false
BLACKFIRE_CLIENT_ID=<client_id>
BLACKFIRE_CLIENT_TOKEN=<client_token>
BLACKFIRE_SERVER_ID=<server_id>
BLACKFIRE_SERVER_TOKEN=<server_token>
### APACHE Container ### APACHE Container
APACHE_HOST_HTTP_PORT=80 APACHE_HOST_HTTP_PORT=80
APACHE_HOST_HTTPS_PORT=443 APACHE_HOST_HTTPS_PORT=443

View File

@ -65,6 +65,19 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Copy xdebug configration for remote debugging # Copy xdebug configration for remote debugging
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
#####################################
# Blackfire:
#####################################
ARG INSTALL_BLACKFIRE=false
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp \
&& mv /tmp/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
;fi
##################################### #####################################
# PHP REDIS EXTENSION FOR PHP 5 # PHP REDIS EXTENSION FOR PHP 5
##################################### #####################################

View File

@ -62,6 +62,19 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Copy xdebug configration for remote debugging # Copy xdebug configration for remote debugging
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
#####################################
# Blackfire:
#####################################
ARG INSTALL_BLACKFIRE=false
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp \
&& mv /tmp/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
;fi
##################################### #####################################
# PHP REDIS EXTENSION FOR PHP 7 # PHP REDIS EXTENSION FOR PHP 7
##################################### #####################################

View File

@ -62,6 +62,19 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Copy xdebug configration for remote debugging # Copy xdebug configration for remote debugging
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
#####################################
# Blackfire:
#####################################
ARG INSTALL_BLACKFIRE=false
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/amd64/$version \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp \
&& mv /tmp/blackfire-*.so $(php -r "echo ini_get('extension_dir');")/blackfire.so \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8707\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
;fi
##################################### #####################################
# PHP REDIS EXTENSION FOR PHP 7 # PHP REDIS EXTENSION FOR PHP 7
##################################### #####################################

View File

@ -135,6 +135,24 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# ADD for REMOTE debugging # ADD for REMOTE debugging
COPY ./xdebug.ini /etc/php/5.6/cli/conf.d/xdebug.ini COPY ./xdebug.ini /etc/php/5.6/cli/conf.d/xdebug.ini
#####################################
# Blackfire:
#####################################
ARG INSTALL_BLACKFIRE=false
ARG BLACKFIRE_CLIENT_ID
ARG BLACKFIRE_CLIENT_TOKEN
ENV BLACKFIRE_CLIENT_ID ${BLACKFIRE_CLIENT_ID}
ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN}
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
curl -L https://packagecloud.io/gpg.key | apt-key add - && \
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
apt-get update && \
apt-get install blackfire-agent \
;fi
##################################### #####################################
# ssh: # ssh:
##################################### #####################################

View File

@ -134,6 +134,24 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# ADD for REMOTE debugging # ADD for REMOTE debugging
COPY ./xdebug.ini /etc/php/7.0/cli/conf.d/xdebug.ini COPY ./xdebug.ini /etc/php/7.0/cli/conf.d/xdebug.ini
#####################################
# Blackfire:
#####################################
ARG INSTALL_BLACKFIRE=false
ARG BLACKFIRE_CLIENT_ID
ARG BLACKFIRE_CLIENT_TOKEN
ENV BLACKFIRE_CLIENT_ID ${BLACKFIRE_CLIENT_ID}
ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN}
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
curl -L https://packagecloud.io/gpg.key | apt-key add - && \
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
apt-get update && \
apt-get install blackfire-agent \
;fi
##################################### #####################################
# ssh: # ssh:
##################################### #####################################

View File

@ -97,6 +97,24 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# ADD for REMOTE debugging # ADD for REMOTE debugging
COPY ./xdebug.ini /etc/php/7.1/cli/conf.d/xdebug.ini COPY ./xdebug.ini /etc/php/7.1/cli/conf.d/xdebug.ini
#####################################
# Blackfire:
#####################################
ARG INSTALL_BLACKFIRE=false
ARG BLACKFIRE_CLIENT_ID
ARG BLACKFIRE_CLIENT_TOKEN
ENV BLACKFIRE_CLIENT_ID ${BLACKFIRE_CLIENT_ID}
ENV BLACKFIRE_CLIENT_TOKEN ${BLACKFIRE_CLIENT_TOKEN}
RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \
curl -L https://packagecloud.io/gpg.key | apt-key add - && \
echo "deb http://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list && \
apt-get update && \
apt-get install blackfire-agent \
;fi
##################################### #####################################
# ssh: # ssh:
##################################### #####################################