Merge pull request #836 from dtunes/feature_blackfire_container
Feature blackfire container
This commit is contained in:
commit
0f7b6bab6b
@ -93,7 +93,7 @@ PHP FPM - HHVM
|
||||
- **Message Queuing:**
|
||||
Beanstalkd - Beanstalkd Console - RabbitMQ - RabbitMQ Console - PHP Worker
|
||||
- **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.
|
||||
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.
|
||||
|
@ -16,6 +16,7 @@ services:
|
||||
context: ./workspace
|
||||
args:
|
||||
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
|
||||
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
|
||||
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
|
||||
- INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
|
||||
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
|
||||
@ -34,6 +35,8 @@ services:
|
||||
- NODE_VERSION=${WORKSPACE_NODE_VERSION}
|
||||
- YARN_VERSION=${WORKSPACE_YARN_VERSION}
|
||||
- TZ=${WORKSPACE_TIMEZONE}
|
||||
- BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
|
||||
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
|
||||
dockerfile: "Dockerfile-${PHP_VERSION}"
|
||||
volumes_from:
|
||||
- applications
|
||||
@ -53,6 +56,7 @@ services:
|
||||
context: ./php-fpm
|
||||
args:
|
||||
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
|
||||
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
|
||||
- INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP}
|
||||
- INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO}
|
||||
- INSTALL_ZIP_ARCHIVE=${PHP_FPM_INSTALL_ZIP_ARCHIVE}
|
||||
@ -115,6 +119,18 @@ services:
|
||||
- frontend
|
||||
- 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 #################################
|
||||
|
||||
apache2:
|
||||
|
10
env-example
10
env-example
@ -74,6 +74,16 @@ NGINX_HOST_HTTPS_PORT=443
|
||||
NGINX_HOST_LOG_PATH=./logs/nginx/
|
||||
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_HOST_HTTP_PORT=80
|
||||
|
@ -65,6 +65,19 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Copy xdebug configration for remote debugging
|
||||
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
|
||||
#####################################
|
||||
|
@ -62,6 +62,19 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Copy xdebug configration for remote debugging
|
||||
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
|
||||
#####################################
|
||||
|
@ -62,6 +62,19 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Copy xdebug configration for remote debugging
|
||||
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
|
||||
#####################################
|
||||
|
@ -135,6 +135,24 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# ADD for REMOTE debugging
|
||||
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:
|
||||
#####################################
|
||||
|
@ -134,6 +134,24 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# ADD for REMOTE debugging
|
||||
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:
|
||||
#####################################
|
||||
|
@ -97,6 +97,24 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# ADD for REMOTE debugging
|
||||
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:
|
||||
#####################################
|
||||
|
Loading…
Reference in New Issue
Block a user