php override, normalize path, php_helper
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
36
docker/usr/local/bin/ngxconfig
Executable file
36
docker/usr/local/bin/ngxconfig
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
shopt -s nullglob
|
||||
|
||||
CONF_DIR=/etc/nginx/conf.d
|
||||
|
||||
usage() {
|
||||
echo -e "Usage: ngxconfig file\n"
|
||||
echo -e "Enables given nginx configuration stored in \"${CONF_DIR}\" as \".disabled\"."
|
||||
echo -e "Exits with code 1 if configuration file was not found.\n"
|
||||
echo -e "Options:\n"
|
||||
echo -e " -h | --help\n\tShow this help.\n"
|
||||
echo -e "Example:\n ngxconfig sf.conf\n"
|
||||
}
|
||||
|
||||
config=
|
||||
|
||||
while [[ "$1" != "" ]]; do
|
||||
case $1 in
|
||||
-h | --help ) usage
|
||||
exit
|
||||
;;
|
||||
* ) config=$1
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [[ -f "/etc/nginx/conf.d/${config}.disabled" ]]; then
|
||||
echo "Enabling config \"${config}\"..."
|
||||
mv ${CONF_DIR}/${config}.disabled ${CONF_DIR}/${config}
|
||||
elif [[ -f "/etc/nginx/conf.d/${config}" ]]; then
|
||||
echo "Config \"${config}\" already enabled!"
|
||||
else
|
||||
echo "Config \"${config}\" not found!"
|
||||
exit 1
|
||||
fi
|
29
docker/usr/local/bin/php_helper.sh
Executable file
29
docker/usr/local/bin/php_helper.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
PHP_VERSION=`php -r 'echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;'`
|
||||
|
||||
|
||||
if [ -f /usr/local/etc/php/php.ini-$ENVIRONMENT ]; then
|
||||
mv /usr/local/etc/php/php.ini-$ENVIRONMENT /usr/local/etc/php/php.ini
|
||||
fi
|
||||
|
||||
|
||||
if [ $PHP_VERSION = '72' ]; then
|
||||
wget -O /bin/composer https://getcomposer.org/composer-1.phar
|
||||
else
|
||||
wget -O /bin/composer https://getcomposer.org/composer.phar
|
||||
fi
|
||||
|
||||
chmod a+x /bin/composer
|
||||
|
||||
|
||||
if [ $PHP_VERSION = '72' ]; then
|
||||
composer global require hirak/prestissimo
|
||||
fi
|
||||
|
||||
if [ $ENVIRONMENT = 'development' ]; then
|
||||
apk --update --no-cache add autoconf g++ make
|
||||
pecl install -f xdebug
|
||||
docker-php-ext-enable xdebug
|
||||
apk del --purge autoconf g++ make
|
||||
fi
|
1
docker/usr/local/etc/php/conf.d/php-override.ini
Normal file
1
docker/usr/local/etc/php/conf.d/php-override.ini
Normal file
@ -0,0 +1 @@
|
||||
memory_limit = 512M
|
1931
docker/usr/local/etc/php/php.ini
Normal file
1931
docker/usr/local/etc/php/php.ini
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user