This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 8f5e0cb2 Banner support
8f5e0cb2 is described below

commit 8f5e0cb21af38f163dfeb50e8a43726358a1ad9f
Author: Sebb <s...@apache.org>
AuthorDate: Fri Jan 12 19:54:21 2024 +0000

    Banner support
---
 Dockerfile                | 5 +++++
 docker-config/whimsy.conf | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/Dockerfile b/Dockerfile
index 0a7df0fc..a5db53d4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -94,6 +94,11 @@ RUN sed -i -e '$i  PassengerDisableSecurityUpdateCheck on' 
/etc/apache2/conf-ena
 # For running SVN in the container
 RUN apt-get install libapache2-mod-svn
 
+# for maintenance banner
+RUN DEBIAN_FRONTEND='noninteractive' apt-get install -y \
+  lua5.2 && \
+  a2enmod lua
+
 WORKDIR /srv/whimsy
 RUN git config --global --add safe.directory /srv/whimsy
 EXPOSE 80
diff --git a/docker-config/whimsy.conf b/docker-config/whimsy.conf
index e31bcb39..243ac9c4 100644
--- a/docker-config/whimsy.conf
+++ b/docker-config/whimsy.conf
@@ -121,6 +121,11 @@ ErrorDocument 500 /500.html
 # However an empty file will work
 # To end maintenance, remove the file.
 
+LuaOutputFilter maintenance "/srv/whimsy/maintenance_banner.lua" output_filter
+<If "-f '/srv/whimsy/www/maintenance.txt'">
+    AddOutputFilter maintenance html cgi
+</If>
+
 # Redirect all requests to a 503 return code when in maintenance mode
 ErrorDocument 503 /503.html
 

Reply via email to