Explorar el Código

Support for Blackfire

Mark Shust hace 5 años
padre
commit
576da05747
Se han modificado 4 ficheros con 21 adiciones y 2 borrados
  1. 4 2
      README.md
  2. 7 0
      compose/bin/start
  3. 5 0
      images/php/7.2/Dockerfile
  4. 5 0
      images/php/7.3/Dockerfile

+ 4 - 2
README.md

@@ -47,10 +47,12 @@ View Dockerfiles:
       - [`1.13-0`](https://github.com/markshust/docker-magento/tree/11.0.0/images/nginx/1.13)
 - [markoshust/magento-php (Docker Hub)](https://hub.docker.com/r/markoshust/magento-php/)
   - 7.3
-      - [`latest`, `7.3-fpm`, `7.3-fpm-1`](https://github.com/markshust/docker-magento/tree/master/images/php/7.3)
+      - [`latest`, `7.3-fpm`, `7.3-fpm-2`](https://github.com/markshust/docker-magento/tree/master/images/php/7.3)
+      - [`7.3-fpm-1`](https://github.com/markshust/docker-magento/tree/26.0.0/images/php/7.3)
       - [`7.3-fpm-0`](https://github.com/markshust/docker-magento/tree/24.2.0/images/php/7.3)
   - 7.2
-      - [`7.2-fpm`, `7.2-fpm-4`](https://github.com/markshust/docker-magento/tree/master/images/php/7.2)
+      - [`7.2-fpm`, `7.2-fpm-5`](https://github.com/markshust/docker-magento/tree/master/images/php/7.2)
+      - [`7.2-fpm-4`](https://github.com/markshust/docker-magento/tree/26.0.0/images/php/7.2)
       - [`7.2-fpm-3`](https://github.com/markshust/docker-magento/tree/24.2.0/images/php/7.2)
       - [`7.2-fpm-2`](https://github.com/markshust/docker-magento/tree/23.2.1/images/php/7.2)
       - [`7.2-fpm-1`](https://github.com/markshust/docker-magento/tree/23.1.1/images/php/7.2)

+ 7 - 0
compose/bin/start

@@ -1,2 +1,9 @@
 #!/bin/bash
 docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d
+
+## Blackfire support
+# ------------------
+## First register the blackfire agent with:
+#bin/root blackfire-agent --register --server-id={YOUR_SERVER_ID} --server-token={YOUR_SERVER_TOKEN}
+## Then uncomment the below line (and leave uncommented) to start the agent automatically with bin/start:
+#bin/root /etc/init.d/blackfire-agent start

+ 5 - 0
images/php/7.2/Dockerfile

@@ -69,6 +69,11 @@ RUN curl -sSLO https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mh
 RUN curl -sS https://getcomposer.org/installer | \
   php -- --version=1.9.0 --install-dir=/usr/local/bin --filename=composer
 
+RUN curl -s https://packages.blackfire.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 blackfire-php
+
 RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/update/cron.php\n' >> /etc/crontab \
   && printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento cron:run\n' >> /etc/crontab \
   && printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento setup:cron:run\n#\n' >> /etc/crontab

+ 5 - 0
images/php/7.3/Dockerfile

@@ -78,6 +78,11 @@ RUN curl -sSLO https://github.com/mailhog/mhsendmail/releases/download/v0.2.0/mh
 RUN curl -sS https://getcomposer.org/installer | \
   php -- --version=1.9.0 --install-dir=/usr/local/bin --filename=composer
 
+RUN curl -s https://packages.blackfire.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 blackfire-php
+
 RUN printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/update/cron.php\n' >> /etc/crontab \
   && printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento cron:run\n' >> /etc/crontab \
   && printf '* *\t* * *\tapp\t%s/usr/local/bin/php /var/www/html/bin/magento setup:cron:run\n#\n' >> /etc/crontab