Updated alpine-setup.sh
This commit is contained in:
parent
3db317a682
commit
edcb233a46
|
@ -6,7 +6,7 @@ dom,embed,enchant,exif,ftp,
|
|||
gd,gettext,gmp,iconv,imap,
|
||||
intl,json,ldap,mcrypt,
|
||||
opcache,openssl,pcntl,pdo,
|
||||
pear,phar,phpdbg,
|
||||
pear,phpdbg,
|
||||
posix,pspell,shmop,
|
||||
snmp,soap,sockets,sysvmsg,sysvsem,
|
||||
sysvshm,wddx,xml,xmlreader,
|
||||
|
@ -19,24 +19,16 @@ LOG_LEVEL="info"
|
|||
|
||||
# Setup php flavor
|
||||
|
||||
if [[ "$FLAVOR" == "debug" ]]; then
|
||||
LOG_LEVEL="debug"
|
||||
/sbin/apk add --update --no-cache php$PHP_VER_SHORT-dbg;
|
||||
fi
|
||||
|
||||
if [ "$FLAVOR" == "full" ] || [ "$FLAVOR" == "debug" ]; then
|
||||
for i in $(echo $PHP_LIST | tr "," "\n"); do
|
||||
PHP_DEPS="${PHP_DEPS} php$PHP_VER_SHORT-$i ";
|
||||
done
|
||||
|
||||
/sbin/apk add --update --no-cache $PHP_DEPS;
|
||||
fi
|
||||
|
||||
# Only setup apache with full flavor parameters
|
||||
if [ "$WITH_APACHE" == "true" ]; then
|
||||
if [ "$FLAVOR" == "full" ] || [ "$FLAVOR" == "debug" ]; then
|
||||
/usr/sbin/addgroup -g 10002 apache ;
|
||||
/usr/sbin/adduser -D -u 10002 -G apache -s /sbin/nologin -h $APP_ROOT apache ;
|
||||
/usr/sbin/addgroup -g 10001 apache ;
|
||||
/usr/sbin/adduser -D -u 10001 -G apache -s /sbin/nologin -h $APP_ROOT apache ;
|
||||
/sbin/apk add --update --no-cache apache2 php$PHP_VER_SHORT-apache2 ;
|
||||
|
||||
sed -i "s|ServerRoot /var/www|ServerRoot ${SERVER_ROOT}|" /etc/apache2/httpd.conf ;
|
||||
|
@ -55,12 +47,12 @@ if [ "$WITH_APACHE" == "true" ]; then
|
|||
sed -i "s|Require ip 127|Require all granted|" /etc/apache2/conf.d/info.conf ;
|
||||
sed -i "s|/run/apache2/httpd.pid|${SERVER_ROOT}/run/httpd.pid|" /etc/apache2/conf.d/mpm.conf ;
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$WITH_DATABASE" == "postgresql" ]; then
|
||||
/sbin/apk add --update --no-cache php$PHP_VER_SHORT-pdo php$PHP_VER_SHORT-pdo_pgsql php$PHP_VER_SHORT-pgsql ;
|
||||
fi
|
||||
|
||||
if [ "$WITH_DATABASE" == "mysql" ]; then
|
||||
/sbin/apk add --update --no-cache php$PHP_VER_SHORT-pdo php$PHP_VER_SHORT-pdo_mysql php$PHP_VER_SHORT-mysql php$PHP_VER_SHORT-mysqli ;
|
||||
/sbin/apk add --update --no-cache php$PHP_VER_SHORT-pdo php$PHP_VER_SHORT-pdo_mysql php$PHP_VER_SHORT-mysql \
|
||||
php$PHP_VER_SHORT-mysqli ;
|
||||
fi
|
Loading…
Reference in New Issue