Move PHP-SPX to be built in the dev step, avoiding dependency crowding in the main prod build.
This commit is contained in:
parent
93da7549ac
commit
36c43289ca
|
@ -22,7 +22,7 @@ final class ProfilerAdvisorCheck
|
|||
return;
|
||||
}
|
||||
|
||||
if (!$this->environment->isDocker()) {
|
||||
if (!$this->environment->isDocker() || !$this->environment->isDevelopment()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ set -x
|
|||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# apt-get update
|
||||
apt-get update
|
||||
|
||||
# Install common scripts
|
||||
# cp -rT /bd_build/dev/scripts/ /usr/local/bin
|
||||
|
@ -16,15 +16,15 @@ export DEBIAN_FRONTEND=noninteractive
|
|||
cp -rT /bd_build/dev/service.full/. /etc/supervisor/full.conf.d/
|
||||
|
||||
# Run service setup for all setup scripts
|
||||
# for f in /bd_build/web/setup/*.sh; do
|
||||
# bash "$f" -H
|
||||
# done
|
||||
for f in /bd_build/dev/setup/*.sh; do
|
||||
bash "$f" -H
|
||||
done
|
||||
|
||||
# Cleanup
|
||||
# apt-get -y autoremove
|
||||
# apt-get clean
|
||||
# rm -rf /var/lib/apt/lists/*
|
||||
# rm -rf /tmp/tmp*
|
||||
apt-get -y autoremove
|
||||
apt-get clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
rm -rf /tmp/tmp*
|
||||
|
||||
# chmod -R a+x /usr/local/bin
|
||||
# chmod -R +x /etc/my_init.d
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
source /etc/php/.version
|
||||
|
||||
# Install PHP SPX profiler
|
||||
apt-get install -y --no-install-recommends php${PHP_VERSION}-dev zlib1g-dev build-essential
|
||||
|
||||
mkdir -p /bd_build/web/php-spx
|
||||
cd /bd_build/web/php-spx
|
||||
|
||||
git clone https://github.com/NoiseByNorthwest/php-spx.git .
|
||||
phpize
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
|
||||
apt-get remove --purge -y php${PHP_VERSION}-dev zlib1g-dev build-essential
|
||||
|
||||
echo "extension=spx.so" > /etc/php/${PHP_VERSION}/mods-available/30-spx.ini
|
||||
ln -s /etc/php/${PHP_VERSION}/mods-available/30-spx.ini /etc/php/${PHP_VERSION}/cli/conf.d/30-spx.ini
|
||||
ln -s /etc/php/${PHP_VERSION}/mods-available/30-spx.ini /etc/php/${PHP_VERSION}/fpm/conf.d/30-spx.ini
|
|
@ -23,21 +23,3 @@ cp /bd_build/web/php/www.conf.tmpl /etc/php/${PHP_VERSION}/fpm/www.conf.tmpl
|
|||
|
||||
# Install Composer
|
||||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
|
||||
|
||||
# Install PHP SPX profiler
|
||||
apt-get install -y --no-install-recommends php${PHP_VERSION}-dev zlib1g-dev build-essential
|
||||
|
||||
mkdir -p /bd_build/web/php-spx
|
||||
cd /bd_build/web/php-spx
|
||||
|
||||
git clone https://github.com/NoiseByNorthwest/php-spx.git .
|
||||
phpize
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
|
||||
apt-get remove --purge -y php${PHP_VERSION}-dev zlib1g-dev build-essential
|
||||
|
||||
echo "extension=spx.so" > /etc/php/${PHP_VERSION}/mods-available/30-spx.ini
|
||||
ln -s /etc/php/${PHP_VERSION}/mods-available/30-spx.ini /etc/php/${PHP_VERSION}/cli/conf.d/30-spx.ini
|
||||
ln -s /etc/php/${PHP_VERSION}/mods-available/30-spx.ini /etc/php/${PHP_VERSION}/fpm/conf.d/30-spx.ini
|
||||
|
|
Loading…
Reference in New Issue