correction setup directus

This commit is contained in:
Valentin 2024-11-19 22:32:50 +01:00
parent 9a0150094d
commit 68df5b68e4
1 changed files with 8 additions and 5 deletions

View File

@ -65,8 +65,11 @@ if [[ -z "$CADDYFILE" ]]; then
CADDYFILE="/home/${username}/caddy/caddyfile/Caddyfile"
fi
echo "cms.${DOMAIN_NAME} {" >> $CADDYFILE
echo "reverse_proxy ${DOMAIN_NAME}_Directus:${port}" >> $CADDYFILE
echo "}" >> $CADDYFILE
if ! grep -q "cms.${DOMAIN_NAME}" "$CADDYFILE"; then
echo "cms.${DOMAIN_NAME} {" >> "$CADDYFILE"
echo " reverse_proxy ${DOMAIN_NAME}_Directus:${port}" >> "$CADDYFILE"
echo "}" >> "$CADDYFILE"
docker restart caddy
else
echo "Entry for cms.${DOMAIN_NAME} already exists in $CADDYFILE."
fi