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 8c7487e Simplify hostname override
8c7487e is described below
commit 8c7487e232573676147e8955f22d393e11883965
Author: Sebb <[email protected]>
AuthorDate: Sun Oct 5 17:59:35 2025 +0100
Simplify hostname override
---
compose.yaml | 1 +
scripts/attic_filter.lua | 6 ------
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/compose.yaml b/compose.yaml
index e00fed9..efd3978 100644
--- a/compose.yaml
+++ b/compose.yaml
@@ -4,6 +4,7 @@ services:
build: .
ports:
- "8000:80"
+ hostname: ${VAR_NAME:-localhost}
volumes:
# Pick up the closer.lua script etc.
# (e.g. set this to a checkout of
infrastructure-p6/modules/closer_cgi/files)
diff --git a/scripts/attic_filter.lua b/scripts/attic_filter.lua
index 1e52eb4..8c54c05 100644
--- a/scripts/attic_filter.lua
+++ b/scripts/attic_filter.lua
@@ -37,12 +37,6 @@ function output_filter(r)
-- get TLP part of hostname
local host = r.hostname:match("^([^.]+)")
- -- Allow override of host name
- if host == 'localhost'
- then
- host = os.getenv('VAR_NAME') or 'unknown'
- end
-
-- create the customised banner
local divstyle =
'font-size:x-large;padding:15px;color:white;background:red;z-index:99;' ;
local astyle = 'color:white;text-decoration:underline' ;