From ea4572c691370ae487d21e8496d9de4bd946dabd Mon Sep 17 00:00:00 2001 From: Aaron Dewes Date: Sat, 17 Feb 2024 15:52:27 +0100 Subject: [PATCH] Clean up container (#13) * Allow any domain * Change log message --- docker/Caddyfile.tpl | 2 +- docker/entrypoint.sh | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docker/Caddyfile.tpl b/docker/Caddyfile.tpl index c89e284..46dd478 100644 --- a/docker/Caddyfile.tpl +++ b/docker/Caddyfile.tpl @@ -1,4 +1,4 @@ -http://%%DOMAIN%% { +:80 { root * /var/www/html file_server diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 591e88e..f1c1c28 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,7 +1,6 @@ #!/bin/sh if [ ! -e "/etc/Caddyfile" ]; then - sed -i "s#%%DOMAIN%%#${DOMAIN:-localhost}#g" /etc/Caddyfile.tpl sed -i "s#%%LOGLEVEL%%#${LOGLEVEL:-INFO}#g" /etc/Caddyfile.tpl sed -i "s#%%LOGFORMAT%%#${LOGFORMAT:-json}#g" /etc/Caddyfile.tpl mv /etc/Caddyfile.tpl /etc/Caddyfile @@ -9,7 +8,7 @@ else rm -f /etc/Caddyfile.tpl fi -echo "Starting UI: http://${DOMAIN:-localhost}" -echo "Logs output: ${LOGLEVEL:-INFO} (${LOGFORMAT:-json})" +echo "Starting UI on port 80" +echo "Logs output: ${LOGLEVEL:-INFO} (${LOGFORMAT:-json})" exec caddy run --config /etc/Caddyfile