mirror of
https://github.com/casjaysdevdocker/cherokee
synced 2025-01-18 06:34:33 -05:00
🗃️ Committing everything that changed 🗃️
This commit is contained in:
parent
ee8e3b0e5d
commit
6bd78df6ea
11
Dockerfile
11
Dockerfile
@ -1,4 +1,4 @@
|
||||
FROM alpine:3.14 AS build
|
||||
FROM casjaysdevdocker/python2:latest AS build
|
||||
|
||||
WORKDIR /tmp/build
|
||||
|
||||
@ -50,18 +50,17 @@ LABEL \
|
||||
maintainer="CasjaysDev <docker-admin@casjaysdev.com>"
|
||||
|
||||
COPY --from=build /usr/local/share/cherokee/. /usr/local/share/cherokee/
|
||||
COPY ./config/. /config/
|
||||
COPY ./data/. /data/
|
||||
COPY ./bin/. /usr/local/bin/
|
||||
|
||||
COPY ./data/. /usr/local/share/template-files/data/
|
||||
COPY ./config/. /usr/local/share/template-files/config/
|
||||
|
||||
ENV PHP_SERVER=cherokee
|
||||
|
||||
WORKDIR /data/htdocs
|
||||
|
||||
EXPOSE 80 19070
|
||||
EXPOSE 19070 19071
|
||||
|
||||
VOLUME [ "/data", "/config", "/etc/ssl" ]
|
||||
VOLUME [ "/data", "/config" ]
|
||||
|
||||
ENTRYPOINT [ "tini", "--" ]
|
||||
HEALTHCHECK --interval=15s --timeout=3s CMD [ "/usr/local/bin/entrypoint-cherokee.sh" "healthcheck" ]
|
||||
|
33
bin/cherokee-server
Normal file
33
bin/cherokee-server
Normal file
@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env sh
|
||||
export PATH="/usr/local/share/cherokee/bin:$PATH"
|
||||
[ -f "/config/ssl.env" ] && . "/config/ssl.env"
|
||||
|
||||
if [ ! -d "/config/cherokee" ] && [ -d "/usr/local/share/template-files/config/cherokee" ]; then
|
||||
mkdir -p "/config/cherokee"
|
||||
cp -Rf "/usr/local/share/template-files/config/cherokee/." "/config/cherokee/"
|
||||
fi
|
||||
|
||||
[ -d "/data/htdocs" ] || mkdir -p "/data/htdocs"
|
||||
[ -d "/data/htdocs/www" ] || cp -Rf "/usr/local/share/template-files/data/." "/data/"
|
||||
[ -d "/usr/lib/cgi-bin" ] && [ -d "" ] && cp -Rf "/usr/lib/cgi-bin/." "/data/htdocs/cgi-bin/"
|
||||
[ -f "/config/cherokee/cherokee.conf" ] && cp -Rfv "/config/cherokee/cherokee.conf" "/etc/cherokee/"
|
||||
[ -d "/usr/local/share/cherokee/icons" ] && [ ! -d "/config/cherokee/icons" ] && cp -Rf "/usr/local/share/cherokee/icons/." "/config/cherokee/icons/"
|
||||
[ -d "/usr/local/share/cherokee/themes" ] && [ ! -d "/config/cherokee/themes" ] && cp -Rf "/usr/local/share/cherokee/themes/." "/config/cherokee/themes/"
|
||||
|
||||
if [ ! -f "/config/ssl/key.pem" ] || [ ! -f "/etc/ssl/crt.pem" ]; then
|
||||
openssl req \
|
||||
-new \
|
||||
-newkey rsa:4096 \
|
||||
-days 3650 \
|
||||
-nodes \
|
||||
-x509 \
|
||||
-subj "/C=US/ST=CA/L=Manhattan\ Beach/O=Managed\ Kaos/OU=Cherokee\ SSL/CN=localhost" \
|
||||
-keyout /etc/ssl/server.pem \
|
||||
-out /etc/ssl/server.pem
|
||||
fi
|
||||
|
||||
if [ ! -f "/tmp/cherokee.pid" ]; then
|
||||
cherokee-admin -b -p 19070 -c /config/cherokee.conf &
|
||||
exec cherokee -c /etc/cherokee/cherokee.conf
|
||||
fi
|
||||
|
@ -6,18 +6,18 @@ server!ipv6 = 1
|
||||
server!keepalive = 1
|
||||
server!keepalive_max_requests = 500
|
||||
server!panic_action = /usr/bin/cherokee-panic
|
||||
server!pid_file = /var/run/cherokee.pid
|
||||
server!pid_file = /tmp/cherokee.pid
|
||||
server!server_tokens = full
|
||||
server!timeout = 15
|
||||
server!tls = libssl
|
||||
server!tls!protocol!SSLv3 = 0
|
||||
vserver!1!directory_index = index.html
|
||||
vserver!1!document_root = /data/htdocs/www
|
||||
vserver!1!error_writer!filename = /var/log/cherokee.error
|
||||
vserver!1!error_writer!filename = /dev/stderr
|
||||
vserver!1!error_writer!type = file
|
||||
vserver!1!logger = combined
|
||||
vserver!1!logger!access!buffsize = 16384
|
||||
vserver!1!logger!access!filename = /var/log/cherokee.access
|
||||
vserver!1!logger!access!filename = /dev/stdout
|
||||
vserver!1!logger!access!type = file
|
||||
vserver!1!nick = default
|
||||
vserver!1!rule!5!encoder!gzip = allow
|
||||
@ -25,11 +25,11 @@ 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 = /usr/lib/cgi-bin
|
||||
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/themes
|
||||
vserver!1!rule!3!document_root = /config/cherokee/themes
|
||||
vserver!1!rule!3!handler = file
|
||||
vserver!1!rule!3!match = directory
|
||||
vserver!1!rule!3!match!directory = /cherokee_themes
|
||||
@ -40,8 +40,8 @@ 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!ssl_certificate_file = /etc/ssl/server.pem
|
||||
vserver!1!ssl_certificate_key_file = /etc/ssl/server.pem
|
||||
vserver!1!ssl_certificate_file = /config/ssl/server.pem
|
||||
vserver!1!ssl_certificate_key_file = /config/ssl/server.pem
|
||||
icons!default = page_white.png
|
||||
icons!directory = folder.png
|
||||
icons!file!bomb.png = core
|
||||
@ -298,3 +298,4 @@ mime!video/x-msvideo!extensions = avi
|
||||
mime!video/x-sgi-movie!extensions = movie
|
||||
mime!x-conference/x-cooltalk!extensions = ice
|
||||
mime!x-world/x-vrml!extensions = vrm,vrml,wrl
|
||||
|
Loading…
x
Reference in New Issue
Block a user