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,
|
gd,gettext,gmp,iconv,imap,
|
||||||
intl,json,ldap,mcrypt,
|
intl,json,ldap,mcrypt,
|
||||||
opcache,openssl,pcntl,pdo,
|
opcache,openssl,pcntl,pdo,
|
||||||
pear,phar,phpdbg,
|
pear,phpdbg,
|
||||||
posix,pspell,shmop,
|
posix,pspell,shmop,
|
||||||
snmp,soap,sockets,sysvmsg,sysvsem,
|
snmp,soap,sockets,sysvmsg,sysvsem,
|
||||||
sysvshm,wddx,xml,xmlreader,
|
sysvshm,wddx,xml,xmlreader,
|
||||||
|
@ -19,42 +19,33 @@ LOG_LEVEL="info"
|
||||||
|
|
||||||
# Setup php flavor
|
# Setup php flavor
|
||||||
|
|
||||||
if [[ "$FLAVOR" == "debug" ]]; then
|
for i in $(echo $PHP_LIST | tr "," "\n"); do
|
||||||
LOG_LEVEL="debug"
|
PHP_DEPS="${PHP_DEPS} php$PHP_VER_SHORT-$i ";
|
||||||
/sbin/apk add --update --no-cache php$PHP_VER_SHORT-dbg;
|
done
|
||||||
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;
|
/sbin/apk add --update --no-cache $PHP_DEPS;
|
||||||
fi
|
|
||||||
|
|
||||||
# Only setup apache with full flavor parameters
|
# Only setup apache with full flavor parameters
|
||||||
if [ "$WITH_APACHE" == "true" ]; then
|
if [ "$WITH_APACHE" == "true" ]; then
|
||||||
if [ "$FLAVOR" == "full" ] || [ "$FLAVOR" == "debug" ]; then
|
/usr/sbin/addgroup -g 10001 apache ;
|
||||||
/usr/sbin/addgroup -g 10002 apache ;
|
/usr/sbin/adduser -D -u 10001 -G apache -s /sbin/nologin -h $APP_ROOT apache ;
|
||||||
/usr/sbin/adduser -D -u 10002 -G apache -s /sbin/nologin -h $APP_ROOT apache ;
|
/sbin/apk add --update --no-cache apache2 php$PHP_VER_SHORT-apache2 ;
|
||||||
/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 ;
|
sed -i "s|ServerRoot /var/www|ServerRoot ${SERVER_ROOT}|" /etc/apache2/httpd.conf ;
|
||||||
sed -i "s|ServerAdmin you@example.com| ServerAdmin map@sindigilive.com|" /etc/apache2/httpd.conf ;
|
sed -i "s|ServerAdmin you@example.com| ServerAdmin map@sindigilive.com|" /etc/apache2/httpd.conf ;
|
||||||
sed -i "s|DocumentRoot \"/var/www/localhost/htdocs\"|DocumentRoot \"${APP_ROOT}\"|" /etc/apache2/httpd.conf ;
|
sed -i "s|DocumentRoot \"/var/www/localhost/htdocs\"|DocumentRoot \"${APP_ROOT}\"|" /etc/apache2/httpd.conf ;
|
||||||
sed -i "s|Directory \"/var/www/localhost/htdocs\"|Directory \"${APP_ROOT}\"|" /etc/apache2/httpd.conf ;
|
sed -i "s|Directory \"/var/www/localhost/htdocs\"|Directory \"${APP_ROOT}\"|" /etc/apache2/httpd.conf ;
|
||||||
sed -i "s|AllowOverride None|AllowOverride All|" /etc/apache2/httpd.conf ;
|
sed -i "s|AllowOverride None|AllowOverride All|" /etc/apache2/httpd.conf ;
|
||||||
sed -i "s|ErrorLog .*|ErrorLog /dev/stderr \nTransferLog /dev/stdout|" /etc/apache2/httpd.conf ;
|
sed -i "s|ErrorLog .*|ErrorLog /dev/stderr \nTransferLog /dev/stdout|" /etc/apache2/httpd.conf ;
|
||||||
sed -i "s|CustomLog .* combined|CustomLog /dev/stdout combined|" /etc/apache2/httpd.conf ;
|
sed -i "s|CustomLog .* combined|CustomLog /dev/stdout combined|" /etc/apache2/httpd.conf ;
|
||||||
sed -i "s|LogLevel .*|LogLevel ${LOG_LEVEL}|" /etc/apache2/httpd.conf ;
|
sed -i "s|LogLevel .*|LogLevel ${LOG_LEVEL}|" /etc/apache2/httpd.conf ;
|
||||||
sed -i "s|#LoadModule rewrite_module|LoadModule rewrite_module|" /etc/apache2/httpd.conf ;
|
sed -i "s|#LoadModule rewrite_module|LoadModule rewrite_module|" /etc/apache2/httpd.conf ;
|
||||||
sed -i "s|#LoadModule deflate_module|LoadModule deflate_module|" /etc/apache2/httpd.conf ;
|
sed -i "s|#LoadModule deflate_module|LoadModule deflate_module|" /etc/apache2/httpd.conf ;
|
||||||
sed -i "s|#LoadModule expires_module|LoadModule expires_module|" /etc/apache2/httpd.conf ;
|
sed -i "s|#LoadModule expires_module|LoadModule expires_module|" /etc/apache2/httpd.conf ;
|
||||||
sed -i "s|/var/www/localhost/cgi-bin/|/app/cgi-bin/|" /etc/apache2/httpd.conf ;
|
sed -i "s|/var/www/localhost/cgi-bin/|/app/cgi-bin/|" /etc/apache2/httpd.conf ;
|
||||||
sed -i "s|Require host .example.com|#Require host .example.com|" /etc/apache2/conf.d/info.conf ;
|
sed -i "s|Require host .example.com|#Require host .example.com|" /etc/apache2/conf.d/info.conf ;
|
||||||
sed -i "s|Require ip 127|Require all granted|" /etc/apache2/conf.d/info.conf ;
|
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 ;
|
sed -i "s|/run/apache2/httpd.pid|${SERVER_ROOT}/run/httpd.pid|" /etc/apache2/conf.d/mpm.conf ;
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$WITH_DATABASE" == "postgresql" ]; then
|
if [ "$WITH_DATABASE" == "postgresql" ]; then
|
||||||
|
@ -62,5 +53,6 @@ if [ "$WITH_DATABASE" == "postgresql" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$WITH_DATABASE" == "mysql" ]; then
|
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
|
fi
|
Loading…
Reference in New Issue