This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/attic-docker.git
The following commit(s) were added to refs/heads/main by this push:
new ddfe9d3 Allow VAR_ATTIC to control banner filter invocation
ddfe9d3 is described below
commit ddfe9d3360ce3e8eba60104816e50fb9548902f3
Author: Sebb <[email protected]>
AuthorDate: Fri Oct 3 16:35:13 2025 +0100
Allow VAR_ATTIC to control banner filter invocation
---
README.md | 4 +++-
compose.yaml | 4 +++-
config/000-default.conf | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index d1e7127..30b34c2 100644
--- a/README.md
+++ b/README.md
@@ -17,6 +17,8 @@ This is shown as /path/to/website in the following
descriptions
To enable/disable the Attic banner, create/delete the directory (not a file!):
`mkdir /path/to/website/_ATTIC`
+Alternatively, define the variable VAR_ATTIC=yes
+
If the banner does not display correctly (e.g. it may be partially hidden
under the menu bar),
you can try to see if any of the existing filter overrides work. Just use the
relevant sitename
in the docker command below instead of the target sitename.
@@ -27,7 +29,7 @@ the closer_cgi/files directory in the private
infrastructure-p6 repository.
If not available, such pages will fail to load, but the site should otherwise
work OK.
Start:
-`[VAR_DYN=/path/to/closer_cgi/files] VAR_HTML=/path/to/website
VAR_NAME=sitename docker compose up`
+`[VAR_DYN=/path/to/closer_cgi/files] VAR_HTML=/path/to/website
VAR_NAME=sitename [VAR_ATTIC=yes] docker compose up`
browse to localhost:8000
diff --git a/compose.yaml b/compose.yaml
index 86539e1..456befb 100644
--- a/compose.yaml
+++ b/compose.yaml
@@ -13,4 +13,6 @@ services:
- ${VAR_LOG:-./log}:/var/log/apache2
environment:
# Pass in site name
- - VAR_NAME=${VAR_NAME:-localhost}
\ No newline at end of file
+ - VAR_NAME=${VAR_NAME:-localhost}
+ # Act as though _ATTIC directory is present (if yes)
+ - VAR_ATTIC=${VAR_ATTIC:-no}
\ No newline at end of file
diff --git a/config/000-default.conf b/config/000-default.conf
index b46a13a..1ef902f 100644
--- a/config/000-default.conf
+++ b/config/000-default.conf
@@ -48,7 +48,7 @@
# Filter website to add Attic header if marker directory is present
LuaOutputFilter attic "/etc/apache2/conf-enabled/attic_filter.lua"
output_filter
- <If "-d '/var/www/site.apache.org/_ATTIC'">
+ <If "-d '/var/www/site.apache.org/_ATTIC' || env('VAR_ATTIC') == 'yes'">
AddOutputFilter attic html lua
</If>