Skip to content

Commit

Permalink
Merge branch 'php8dot1' of github.com:moveis-simonetti/php-apache-oci…
Browse files Browse the repository at this point in the history
…8-composer into php8dot2
  • Loading branch information
lucassabreu committed Jul 26, 2024
2 parents 5470276 + 52bacad commit eaffb7d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@ ENV \
XDEBUG_VERSION="-3.2.1" \
XDEBUG_REMOTE_PORT=9000 \
PHP_EXTENSION_WDDX=1 \
PHP_OPENSSL=1

ENV CONTAINER_STARTED_LOCK=/var/lock/container.starting
PHP_OPENSSL=1 \
CONTAINER_STARTED_LOCK=/var/lock/container.starting

RUN apt-get update && apt-get install -y --no-install-recommends wget vim supervisor libfreetype6-dev libjpeg-dev libjpeg62-turbo-dev \
libmcrypt-dev libpng-dev libssl-dev libaio1 git libcurl4-openssl-dev libxslt-dev \
libldap2-dev libicu-dev libc-client-dev libkrb5-dev libsqlite3-dev libedit-dev \
sudo zlib1g zlib1g-dev libzip4 libzip-dev zip unzip librabbitmq-dev musl-dev && \
rm -rf /var/lib/apt/lists/*

RUN a2enmod rewrite unique_id
RUN a2enmod rewrite unique_id headers

RUN docker-php-ext-configure gd --with-jpeg \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \
Expand Down Expand Up @@ -84,6 +83,7 @@ RUN echo "---> Fix permissions" \
&& mkdir /var/www/.composer && chown -R www-data:www-data /var/www/.composer

COPY configs/ports.conf /etc/apache2/ports.conf
COPY configs/headers.conf /etc/apache2/conf-enabled/headers.conf
COPY configs/logs.conf /etc/apache2/conf-enabled/logs.conf
COPY configs/php-errors.ini /usr/local/etc/php/conf.d/php-errors.ini
COPY apache-run.sh /usr/bin/apache-run
Expand Down
9 changes: 9 additions & 0 deletions bin/newrelic-setup
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ if [[ ${NR_ENABLED} == true ]]; then
sed -i -e "s/"REPLACE_WITH_REAL_KEY"/${NR_LICENSE_KEY}/g" /usr/local/etc/php/conf.d/newrelic.ini
sed -i -e "s/PHP Application/${NR_APP_NAME}/g" /usr/local/etc/php/conf.d/newrelic.ini
echo "newrelic.enabled = true" | tee -a /usr/local/etc/php/conf.d/newrelic.ini

if [[ ${NR_DISTRIBUTED_TRACING_ENABLED} == true ]]; then
echo "newrelic.distributed_tracing_enabled = true" | tee -a /usr/local/etc/php/conf.d/newrelic.ini
fi

if [[ ${NR_APPLICATION_LOGGING_ENABLED} == true ]]; then
echo "newrelic.application_logging.enabled = true" | tee -a /usr/local/etc/php/conf.d/newrelic.ini
fi

else
echo "newrelic.enabled = false" | tee -a /usr/local/etc/php/conf.d/newrelic.ini
fi
1 change: 1 addition & 0 deletions configs/headers.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Header append X-Request-UID "%{UNIQUE_ID}e"

0 comments on commit eaffb7d

Please sign in to comment.