Skip to content

Commit

Permalink
Add newrelic to PHP 8.3 #187
Browse files Browse the repository at this point in the history
  • Loading branch information
csandanov committed Dec 26, 2023
1 parent 0c6dee4 commit 2297cbd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
24 changes: 11 additions & 13 deletions 8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -267,19 +267,17 @@ RUN set -xe; \
# http://osmanov-dev-notes.blogspot.com/2013/07/fixing-php-start-up-error-unable-to.html
mv /usr/local/etc/php/conf.d/docker-php-ext-event.ini /usr/local/etc/php/conf.d/z-docker-php-ext-event.ini; \
\
if [[ "${PHP_VERSION:0:3}" != "8.3" ]]; then \
# NewRelic extension and agent. \
newrelic_url="http://download.newrelic.com/php_agent/release/"; \
wget -r -nd --no-parent -P /tmp/newrelic -Alinux-musl.tar.gz "${newrelic_url}" >/dev/null 2>&1; \
tar -xzf /tmp/newrelic/newrelic-php*.tar.gz --strip=1 -C /tmp/newrelic; \
export NR_INSTALL_SILENT=true; \
export NR_INSTALL_USE_CP_NOT_LN=true; \
bash /tmp/newrelic/newrelic-install install; \
rm -f /usr/local/etc/php/conf.d/newrelic.ini; \
mkdir -p /var/log/newrelic/; \
chown -R www-data:www-data /var/log/newrelic/; \
chmod -R 775 /var/log/newrelic/; \
fi; \
# NewRelic extension and agent. \
newrelic_url="http://download.newrelic.com/php_agent/release/"; \
wget -r -nd --no-parent -P /tmp/newrelic -Alinux-musl.tar.gz "${newrelic_url}" >/dev/null 2>&1; \
tar -xzf /tmp/newrelic/newrelic-php*.tar.gz --strip=1 -C /tmp/newrelic; \
export NR_INSTALL_SILENT=true; \
export NR_INSTALL_USE_CP_NOT_LN=true; \
bash /tmp/newrelic/newrelic-install install; \
rm -f /usr/local/etc/php/conf.d/newrelic.ini; \
mkdir -p /var/log/newrelic/; \
chown -R www-data:www-data /var/log/newrelic/; \
chmod -R 775 /var/log/newrelic/; \
\
# Brotli extension.
brotli_ext_ver="0.14.2"; \
Expand Down
4 changes: 1 addition & 3 deletions 8/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ process_templates() {
fi

# Extensions that don't work with --enabled-debug
if [[ "${php_ver_minor}" != "8.3" ]]; then
_gotpl "docker-php-ext-newrelic.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php-ext-newrelic.ini"
fi;
_gotpl "docker-php-ext-newrelic.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php-ext-newrelic.ini"

_gotpl "docker-php-${php_ver_minor}.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php.ini"
_gotpl "docker-php-ext-apcu.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini"
Expand Down
1 change: 1 addition & 0 deletions 8/tests/php_modules/8.3
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ memcached
mongodb
mysqli
mysqlnd
newrelic
OAuth
openssl
opentelemetry
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ e.g. `$PHP_EXTENSIONS_DISABLE=event,ds`
| [mongodb] | 1.17.1 | 1.17.1 | 1.17.1 |
| mysqli | | | |
| mysqlnd | | | |
| [newrelic] | - | latest | latest |
| [newrelic] | latest | latest | latest |
| [OAuth] | 2.0.7 | 2.0.7 | 2.0.7 |
| openssl | | | |
| [opentelemetry] | 1.0.0 | 1.0.0 | 1.0.0 |
Expand Down

0 comments on commit 2297cbd

Please sign in to comment.