diff --git a/build/make/lighttpd-php.mk b/build/make/lighttpd-php.mk index 37ae70f..10070de 100644 --- a/build/make/lighttpd-php.mk +++ b/build/make/lighttpd-php.mk @@ -1,2 +1,3 @@ lighttpd-php: php lighttpd - $(call script_force,$@) \ No newline at end of file + $(call script,$@) + $(call boot,02,$@) diff --git a/build/make/phpmyadmin.mk b/build/make/phpmyadmin.mk index dd8a588..8d48e17 100644 --- a/build/make/phpmyadmin.mk +++ b/build/make/phpmyadmin.mk @@ -1,3 +1,3 @@ -phpmyadmin: lighttpd-php +phpmyadmin: $(call script,$@) - $(call boot,02,$@) \ No newline at end of file + $(call boot,02,$@) diff --git a/build/make/webserver.mk b/build/make/webserver.mk index a92c7ef..a32d8e0 100644 --- a/build/make/webserver.mk +++ b/build/make/webserver.mk @@ -1,3 +1,3 @@ -webserver: phpmyadmin +webserver: lighttpd-php phpmyadmin $(call script,$@) - $(call boot,02,$@) \ No newline at end of file + $(call boot,02,$@) diff --git a/build/scripts/lighttpd-php.sh b/build/scripts/lighttpd-php.sh index c4349f5..c5e42e3 100644 --- a/build/scripts/lighttpd-php.sh +++ b/build/scripts/lighttpd-php.sh @@ -3,6 +3,16 @@ set -e source /build/config set -x -## Enable configuration PHP in Lighttpd -ln -s /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-enabled/10-fastcgi.conf -ln -s /etc/lighttpd/conf-available/15-fastcgi-php.conf /etc/lighttpd/conf-enabled/15-fastcgi-php.conf +## Environment +export_env PHP_CONFIG /host/etc/php.ini +export_env PHP_FCGI_CONFIG /etc/lighttpd/conf-enabled/15-fastcgi-php.conf +export_env PHP_FCGI_PORT 5555 +export_env PHP_FCGI_CHILDREN 16 +export_env PHP_FCGI_MAX_REQUESTS 2000 + +## Configuration +ln -s /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-enabled/ +cp /etc/lighttpd/conf-available/15-fastcgi-php.conf /etc/lighttpd/conf-enabled/ +sed -i "s,\(\"PHP_FCGI_CHILDREN\"\s*=>\s*\"\).*$,\1$PHP_FCGI_CHILDREN\"\,," $PHP_FCGI_CONFIG +sed -i "s,\(\"PHP_FCGI_MAX_REQUESTS\"\s*=>\s*\"\).*$,\1$PHP_FCGI_MAX_REQUESTS\"\,," $PHP_FCGI_CONFIG +sed -i "s,\(\"socket\"\),\"host\" => \"127.0.0.1\"\,\n\t\t\"port\" => $PHP_FCGI_PORT\,\n\t\t#\1," $PHP_FCGI_CONFIG diff --git a/build/scripts/phpmyadmin.sh b/build/scripts/phpmyadmin.sh index b7a911b..c77bb7f 100644 --- a/build/scripts/phpmyadmin.sh +++ b/build/scripts/phpmyadmin.sh @@ -4,13 +4,12 @@ source /build/config set -x ## phpMyAdmin -export_env PMA_VERSION 4.5.2 +export_env PMA_VERSION 4.5.3.1 export_env PMA_CONFIG /var/www/config.inc.php cd /opt wget https://files.phpmyadmin.net/phpMyAdmin/$PMA_VERSION/phpMyAdmin-$PMA_VERSION-all-languages.tar.gz -tar xzf phpMyAdmin-$PMA_VERSION-all-languages.tar.gz -mkdir phpMyAdmin-$PMA_VERSION -mv phpMyAdmin-$PMA_VERSION-* phpMyAdmin-$PMA_VERSION +tar xzf phpMyAdmin-$PMA_VERSION-all-languages.tar.gz phpMyAdmin-$PMA_VERSION-all-languages +mv phpMyAdmin-$PMA_VERSION-*/ phpMyAdmin-$PMA_VERSION/ rm -r /var/www ln -s /opt/phpMyAdmin-$PMA_VERSION /var/www diff --git a/images/webserver.mk b/images/webserver.mk deleted file mode 100644 index 77a5914..0000000 --- a/images/webserver.mk +++ /dev/null @@ -1,6 +0,0 @@ -include $(DOCKER_HOME)/build/Makefile - -NAME = webserver -VERSION = latest - -build: phpmyadmin webserver \ No newline at end of file