🗃️ Committing everything that changed 🗃️

This commit is contained in:
casjay 2022-10-11 18:57:47 -04:00
parent 671a763245
commit 9318a8fa07
No known key found for this signature in database
GPG Key ID: 4F765975C1F0EE5F
3 changed files with 49 additions and 30 deletions

View File

@ -23,14 +23,12 @@ RUN apk -U upgrade && \
geoip-dev \
php8-cgi
RUN mkdir -p "/usr/local/share/template-files/config/cherokee/defaults" "/buildroot" && \
RUN mkdir -p "/usr/local/share/template-files/config/defaults/cherokee" "/buildroot" && \
cd /tmp/build && \
git clone https://github.com/cherokee/webserver.git . && \
/usr/bin/libtoolize && \
aclocal && autoheader && touch ./ChangeLog ./README && autoconf && \
./autogen.sh --prefix=/usr/local/share/cherokee --sysconfdir=/usr/local/share/cherokee/etc \
--localstatedir=/usr/local/share/cherokee/var --enable-static-module=all --enable-static \
--enable-shared=no && \
./autogen.sh --prefix=/usr/local/share/cherokee --sysconfdir=/etc/cherokee --localstatedir=/tmp/cherokee --enable-static-module=all --enable-static --enable-shared=no && \
autoreconf -iv && \
make && make install && \
echo "<p style='text-align:center'>Built from $(git rev-parse --short HEAD) on $(date)</p>" > ./version.txt && \
@ -47,7 +45,7 @@ RUN mkdir -p "/usr/local/share/template-files/config/cherokee/defaults" "/buildr
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=US/ST=CA/L=CA/O=Cherokee/OU=Cherokee/CN=localhost" -keyout /etc/ssl/key.pem -out /etc/ssl/crt.pem && \
ln -sf /usr/local/share/cherokee/bin/* /usr/local/bin/ && \
ln -sf /usr/local/share/cherokee/sbin/* /usr/local/bin/ && \
cp -Rf "/usr/local/share/cherokee/etc/." "/usr/local/share/template-files/config/cherokee/defaults/" && \
cp -Rf "/etc/cherokee/." "/usr/local/share/template-files/config/defaults/cherokee/" && \
cp -Rf "/usr/local/." "/buildroot/" && \
rm -Rf /var/cache/apk/* /tmp/* /var/tmp/* /tmp/build /usr/src/*

View File

@ -4,7 +4,7 @@
[ -n "$DEBUG" ] && set -x
set -o pipefail
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
export PATH="/usr/local/share/cherokee/bin:$PATH"
export PATH="/usr/local/share/cherokee/bin:/usr/local/share/cherokee/sbin:$PATH"
[ -f "/config/ssl.env" ] && . "/config/ssl.env"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if [ ! -d "/config/cherokee" ] && [ -d "/usr/local/share/template-files/config/cherokee" ]; then
@ -13,7 +13,7 @@ if [ ! -d "/config/cherokee" ] && [ -d "/usr/local/share/template-files/config/c
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[ -d "/data/cherokee/graphs" ] || mkdir -p "/data/cherokee/graphs"
[ -d "/config/cherokee" ] && cp -Rf "/config/cherokee/." "/etc/cherokee/" || cp -Rf "/usr/local/share/template-files/config/defaults/cherokee/" "/etc/cherokee/"
[ -d "/config/cherokee" ] && cp -Rf "/config/cherokee/." "/etc/cherokee/" || cp -Rf "/usr/local/share/template-files/config/defaults/" "/etc/cherokee/"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[ -d "/data/htdocs" ] || mkdir -p "/data/htdocs"
[ -d "/config/cherokee/themes" ] && cp -Rf "/config/cherokee/themes/." "/usr/local/share/cherokee/share/cherokee/themes/"
@ -30,8 +30,10 @@ if [ ! -f "/config/ssl//localhost.crt" ] || [ ! -f "/config/ssl//localhost.key"
create-ssl-cert
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
php-fpm-server
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if [ ! -f "/tmp/cherokee.pid" ]; then
cherokee-admin -b -p 9090 -c /etc/cherokee/cherokee.conf &
cherokee-admin -b -p 9090 -C /etc/cherokee/cherokee.conf &
exec cherokee -C /etc/cherokee/cherokee.conf || rm -Rf "/tmp/cherokee.pid"
fi

View File

@ -8,9 +8,9 @@ server!pid_file = /tmp/cherokee.pid
server!post_track = post_track
server!server_tokens = product
server!timeout = 15
vserver!1!directory_index = index.html
vserver!1!directory_index = index.html,index.html.var,index.php,index.cgi,index.asp,index.aspx,index.pl,index.aspx,Default.aspx,default.aspx,index.shtml,awstats.pl,index.unknown.php,index.default.php,index.txt,index.json
vserver!1!document_root = /data/htdocs/www
vserver!1!error_writer!filename = /dev/stderr
vserver!1!error_writer!filename = /data/cherokee/error.log
vserver!1!error_writer!type = file
vserver!1!evhost = evhost
vserver!1!evhost!tpl_document_root = /data/htdocs/www/${domain}
@ -22,26 +22,45 @@ vserver!1!logger!x_real_ip_access = 0.0.0.0
vserver!1!logger!x_real_ip_access_all = 0
vserver!1!logger!x_real_ip_enabled = 1
vserver!1!nick = default
vserver!1!rule!5!encoder!gzip = allow
vserver!1!rule!5!handler = server_info
vserver!1!rule!5!handler!type = just_about
vserver!1!rule!5!match = directory
vserver!1!rule!5!match!directory = /about
vserver!1!rule!4!document_root = /data/htdocs/cgi-bin
vserver!1!rule!4!handler = cgi
vserver!1!rule!4!match = directory
vserver!1!rule!4!match!directory = /cgi-bin
vserver!1!rule!3!document_root = /usr/local/share/cherokee/share/cherokee/themes
vserver!1!rule!3!handler = file
vserver!1!rule!3!match = directory
vserver!1!rule!3!match!directory = /cherokee_themes
vserver!1!rule!2!document_root = /usr/local/share/cherokee/share/cherokee/icons
vserver!1!rule!2!handler = file
vserver!1!rule!2!match = directory
vserver!1!rule!2!match!directory = /cherokee_icons
vserver!1!rule!1!handler = common
vserver!1!rule!1!handler!iocache = 1
vserver!1!rule!1!match = default
vserver!1!rule!60!encoder!gzip = allow
vserver!1!rule!60!flcache = allow
vserver!1!rule!60!flcache!policy = explicitly_allowed
vserver!1!rule!60!handler = fcgi
vserver!1!rule!60!handler!balancer = round_robin
vserver!1!rule!60!handler!balancer!source!10 = 1
vserver!1!rule!60!handler!error_handler = 1
vserver!1!rule!60!match = extensions
vserver!1!rule!60!match!check_local_file = 1
vserver!1!rule!60!match!extensions = php
vserver!1!rule!60!match!final = 0
vserver!1!rule!60!timeout = 30
vserver!1!rule!50!encoder!gzip = allow
vserver!1!rule!50!handler = server_info
vserver!1!rule!50!handler!type = just_about
vserver!1!rule!50!match = directory
vserver!1!rule!50!match!directory = /about
vserver!1!rule!40!document_root = /data/htdocs/cgi-bin
vserver!1!rule!40!handler = cgi
vserver!1!rule!40!match = directory
vserver!1!rule!40!match!directory = /cgi-bin
vserver!1!rule!30!document_root = /usr/local/share/cherokee/share/cherokee/themes
vserver!1!rule!30!handler = file
vserver!1!rule!30!match = directory
vserver!1!rule!30!match!directory = /cherokee_themes
vserver!1!rule!20!document_root = /usr/local/share/cherokee/share/cherokee/icons
vserver!1!rule!20!handler = file
vserver!1!rule!20!match = directory
vserver!1!rule!20!match!directory = /cherokee_icons
vserver!1!rule!10!handler = common
vserver!1!rule!10!handler!iocache = 1
vserver!1!rule!10!match = default
source!1!env!PHP_FCGI_CHILDREN = 5
source!1!env!PHP_FCGI_MAX_REQUESTS = 490
source!1!env_inherited = 0
source!1!host = 127.0.0.1:9000
source!1!interpreter = /usr/bin/php-cgi -b 127.0.0.1:9000
source!1!nick = PHP Interpreter
source!1!type = host
icons!default = page_white.png
icons!directory = folder.png
icons!file!bomb.png = core