Clean up container (#13)

* Allow any domain

* Change log message
This commit is contained in:
Aaron Dewes 2024-02-17 15:52:27 +01:00 committed by GitHub
parent 27de381f5e
commit ea4572c691
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View File

@ -1,4 +1,4 @@
http://%%DOMAIN%% {
:80 {
root * /var/www/html
file_server

View File

@ -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