updated to support topics & comments
All checks were successful
Build And Push Oracolo to Docker Hub / build-push-docker-image (push) Successful in 1m6s

This commit is contained in:
PastaGringo 2024-06-06 19:56:18 +00:00
parent 17037d240d
commit 22ab487676
3 changed files with 21 additions and 5 deletions

View file

@ -3,4 +3,6 @@ ORACOLO_DOMAIN=
NPUB=
RELAYS=
TOP_NOTES_NB=
SHORT_CHARS_NB=
SHORT_CHARS_NB=
TOPICS=
COMMENTS_ENABLED

View file

@ -47,6 +47,8 @@ services:
- RELAYS=${RELAYS}
- TOP_NOTES_NB=${TOP_NOTES_NB}
- SHORT_CHARS_NB=${SHORT_CHARS_NB}
- TOPICS=${TOPICS}
- COMMENTS_ENABLED=${COMMENTS_ENABLE}
# ports:
# - 8080:8080
labels:

View file

@ -15,10 +15,12 @@ echo "╭───────────────────────
echo "│ Docker Env Vars... ⤵️ │"
echo "╰───────────────────────╯"
echo
echo "> NPUB : $NPUB"
echo "> RELAYS : $RELAYS"
echo "> TOP_NOTES : $TOP_NOTES_NB"
echo "> SHORT_CHARS : $SHORT_CHARS_NB"
echo "> NPUB : $NPUB"
echo "> RELAYS : $RELAYS"
echo "> TOP_NOTES : $TOP_NOTES_NB"
echo "> SHORT_CHARS : $SHORT_CHARS_NB"
echo "> TOPICS : $TOPICS"
echo "> COMMENTS_ENABLED : $COMMENTS_ENABLED"
echo
echo "╭───────────────────────────╮"
echo "│ Configuring Oracolo... ⏳ │"
@ -43,6 +45,16 @@ old_SHORT_CHARS='name="short-chars" value="0"'
SHORT_CHARS="name=\"short-chars\" value=\"$SHORT_CHARS_NB\""
sed -i "s|$old_SHORT_CHARS|$SHORT_CHARS|g" $src_index_html
echo "✅"
echo -n "> Updating topics... "
old_TOPICS='name="topics" value=""'
TOPICS="name=\"topics\" value=\"$TOPICS\""
sed -i "s|$old_TOPICS|$TOPICS|g" $src_index_html
echo "✅"
echo -n "> Updating comments... "
old_COMMENTS='name="comments" value="yes"'
COMMENTS_ENABLED="name=\"comments\" value=\"$COMMENTS_ENABLED\""
sed -i "s|$old_COMMENTS|$COMMENTS_ENABLED|g" $src_index_html
echo "✅"
echo
echo "╭──────────────────────╮"
echo "│ Starting Nginx... 🚀 │"