Ordisrespector-pool-ui/docker/entrypoint.sh
2023-08-19 18:35:03 +02:00

13 lines
368 B
Bash

#!/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
else
rm -f /etc/Caddyfile.tpl
fi
exec caddy run --config /etc/Caddyfile