public-pool-ui/docker/entrypoint.sh
Aaron Dewes ea4572c691
Clean up container (#13)
* Allow any domain

* Change log message
2024-02-17 09:52:27 -05:00

15 lines
390 B
Bash

#!/bin/sh
if [ ! -e "/etc/Caddyfile" ]; then
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
else
rm -f /etc/Caddyfile.tpl
fi
echo "Starting UI on port 80"
echo "Logs output: ${LOGLEVEL:-INFO} (${LOGFORMAT:-json})"
exec caddy run --config /etc/Caddyfile