Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add newrelic as an option to the PHP extensions installation #2777

Closed
DrowningElysium opened this issue Nov 19, 2020 · 3 comments
Closed

Add newrelic as an option to the PHP extensions installation #2777

DrowningElysium opened this issue Nov 19, 2020 · 3 comments

Comments

@DrowningElysium
Copy link
Contributor

DrowningElysium commented Nov 19, 2020

Is your feature request related to a problem? Please describe.
Hello for our project we use a service called newrelic. This has also been added in our composer.json which makes it so we need to have it locally too. I would love to be able to install this extension in Laradock.

If it can't be supported officially I love to get some instructions on how to add it myself. I wasn't able to find this out by looking at the docker file (I am new to docker).

Additional context
Installation instructions that I got:

echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | sudo tee /etc/apt/sources.list.d/newrelic.list
wget -O- https://download.newrelic.com/548C16BF.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install newrelic-php5
sudo newrelic-install install

Docs about installation:
https://docs.newrelic.com/docs/agents/php-agent/installation/php-agent-installation-ubuntu-debian

Docs about preseeding:
https://docs.newrelic.com/docs/agents/php-agent/installationaphp-agent-installation-ubuntu-debian#preseeding

@DrowningElysium DrowningElysium changed the title [Feature Request] Add newrelic as an option to the PHP extensions installation Add newrelic as an option to the PHP extensions installation Nov 19, 2020
@DrowningElysium
Copy link
Contributor Author

DrowningElysium commented Nov 19, 2020

What I've tried adding to php-fpm/Dockerfile and workspace/Dockerfile is:

###########################################################################
# NEWRELIC:
###########################################################################

USER root

ARG INSTALL_NEWRELIC=false

RUN if [ ${INSTALL_NEWRELIC} = true ]; then \
 	echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | sudo tee /etc/apt/sources.list.d/newrelic.list \
	&& wget -O- https://download.newrelic.com/548C16BF.gpg | sudo apt-key add - \
	&& apt-get update -yqq \
	&& DEBIAN_FRONTEND=noninteractive apt-get -y install newrelic-php5 \
;fi

After installation I still get that the extension is not enabled. I've added it to the .env and set it to true.

Edit: I found the issue. I forgot to remove the sudo from the pipe commands.
Also wget can't be used and had to be replaced with curl.
Which results in the following:


###########################################################################
# NEWRELIC:
###########################################################################

USER root

ARG INSTALL_NEWRELIC=false

RUN if [ ${INSTALL_NEWRELIC} = true ]; then \
 	echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | tee /etc/apt/sources.list.d/newrelic.list \
	&& curl https://download.newrelic.com/548C16BF.gpg | apt-key add - \
	&& apt-get update -yqq \
	&& DEBIAN_FRONTEND=noninteractive apt-get -y install newrelic-php5 \
;fi

@calebanthony
Copy link

This is already a PR: #2755

@DrowningElysium
Copy link
Contributor Author

My bad. I didn't see it at the time. But also there is an issue with the PR. And I am not sure if it is still gonna be fixed or merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants