deploy: sed delimiter '|' for the Caddyfile hash render (bcrypt contains '/')

Plus a regression seam that reproduces the render with a slash-bearing
hash.
This commit is contained in:
Frank
2026-08-21 21:48:15 -07:00
parent 4a679fce80
commit 6ea490d64c
2 changed files with 14 additions and 1 deletions
+2 -1
View File
@@ -128,8 +128,9 @@ if [ '${COPY_SHARED[$TARGET]}' = '1' ]; then
if [ -z \"\${CADDY_BASICAUTH_HASH:-}\" ]; then
echo ' WARN: CADDY_BASICAUTH_HASH not set in .env; keeping placeholder'
else
# '|' delimiter: the bcrypt hash contains '/' characters.
mkdir -p /home/dank/Containers/caddy
sed \"s/REPLACE_WITH_HASH/\${CADDY_BASICAUTH_HASH}/g\" dankclaw/Caddyfile \\
sed \"s|REPLACE_WITH_HASH|\${CADDY_BASICAUTH_HASH}|g\" dankclaw/Caddyfile \\
> /home/dank/Containers/caddy/Caddyfile
fi
fi