Fix webserver (lighttpd/php/phpmyadmin) stack

This commit is contained in:
2015-12-27 15:44:26 +01:00
committed by Bram Veenboer
parent 1ef576e910
commit 9f303d024a
6 changed files with 22 additions and 18 deletions

View File

@@ -1,2 +1,3 @@
lighttpd-php: php lighttpd
$(call script_force,$@)
$(call script,$@)
$(call boot,02,$@)

View File

@@ -1,3 +1,3 @@
phpmyadmin: lighttpd-php
phpmyadmin:
$(call script,$@)
$(call boot,02,$@)
$(call boot,02,$@)

View File

@@ -1,3 +1,3 @@
webserver: phpmyadmin
webserver: lighttpd-php phpmyadmin
$(call script,$@)
$(call boot,02,$@)
$(call boot,02,$@)

View File

@@ -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

View File

@@ -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

View File

@@ -1,6 +0,0 @@
include $(DOCKER_HOME)/build/Makefile
NAME = webserver
VERSION = latest
build: phpmyadmin webserver