Skip to content

Commit

Permalink
removing Blackfire
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaillat committed Dec 12, 2023
1 parent e72a210 commit 418a0ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 83 deletions.
9 changes: 2 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -166,18 +166,13 @@ RUN echo "BUILDING AND INSTALLING FFMPEG" \
&& make distclean \
)
#&& rm -rf /tmp/ffmpeg
RUN echo "INSTALLING NEWRELIC AND BLACKFIRE EXTENTIONS" \
RUN echo "INSTALLING NEWRELIC EXTENTION" \
&& echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | tee /etc/apt/sources.list.d/newrelic.list \
&& curl -o- https://download.newrelic.com/548C16BF.gpg | apt-key add - \
&& apt-get update \
&& apt-get install -y newrelic-php5 \
&& NR_INSTALL_SILENT=1 newrelic-install install \
&& touch /etc/newrelic/newrelic.cfg \
&& curl -o- 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 update \
&& apt install blackfire-agent \
&& apt install blackfire-php
&& touch /etc/newrelic/newrelic.cfg
RUN echo "FINALIZING BUILD AND CLEANING" \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists \
Expand Down
67 changes: 1 addition & 66 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
- SESSION_SAVE_HANDLER
- SESSION_SAVE_PATH
- PHRASEANET_CACHE_TYPE
Expand Down Expand Up @@ -255,9 +252,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
- SESSION_SAVE_HANDLER
- SESSION_SAVE_PATH
- PHRASEANET_MAINTENANCE
Expand Down Expand Up @@ -308,6 +302,7 @@ services:
- LC_NAME=C.UTF-8
- PHRASEANET_EXPLODE_WORKER
- PHRASEANET_WORKERS_LAUNCH_METHOD
- PHRASEANET_WORKER_CUSTOM
- PHRASEANET_WORKER_assetsIngest
- PHRASEANET_WORKER_createRecord
- PHRASEANET_WORKER_deleteRecord
Expand Down Expand Up @@ -337,9 +332,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -391,9 +383,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -446,9 +435,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -500,9 +486,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -555,9 +538,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -609,9 +589,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -663,9 +640,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -717,9 +691,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -771,9 +742,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -825,9 +793,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -879,9 +844,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -933,9 +895,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -987,9 +946,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -1044,9 +1000,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -1098,9 +1051,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -1152,9 +1102,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -1206,9 +1153,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -1260,9 +1204,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -1314,9 +1255,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down Expand Up @@ -1366,9 +1304,6 @@ services:
- NEWRELIC_ENABLED
- NEWRELIC_LICENSE_KEY
- NEWRELIC_APP_NAME
- BLACKFIRE_ENABLED
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
volumes:
- ${PHRASEANET_CONFIG_DIR}:/var/alchemy/Phraseanet/config:rw
- ${PHRASEANET_LOGS_DIR}:/var/alchemy/Phraseanet/logs:rw
Expand Down
11 changes: 1 addition & 10 deletions docker/phraseanet/worker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,6 @@ else
rm -f /usr/local/etc/php/conf.d/newrelic.ini
fi

if [[ $BLACKFIRE_ENABLED = "true" ]]; then
echo `date +"%Y-%m-%d %H:%M:%S"` " - BlackFire setup."
blackfire-agent --register --server-id=$BLACKFIRE_SERVER_ID --server-token=$BLACKFIRE_SERVER_TOKEN
service blackfire-agent start
echo "Blackfire setup done"
else
echo `date +"%Y-%m-%d %H:%M:%S"` " - blackfire extension deactivation."
rm -f /usr/local/etc/php/conf.d/zz-blackfire.ini
fi

rm -rf bin/run-worker.sh

if [ ! -z "$PHRASEANET_SCHEDULER" ] ; then
Expand Down Expand Up @@ -123,6 +113,7 @@ else
fi
done


echo $NBR_WORKERS " workers defined"
echo $NBR_WORKERS > bin/workers_count.txt
chown root:app bin/workers_count.txt
Expand Down

0 comments on commit 418a0ed

Please sign in to comment.