fix: another issue with kiln feature

This commit is contained in:
valvin 2022-09-18 20:41:49 +02:00
parent 0979bfdc34
commit c16409dab4
1 changed files with 16 additions and 6 deletions

View File

@ -20,19 +20,30 @@ update_repository(){
else else
cd ${GEMINI_GIT_PATH} cd ${GEMINI_GIT_PATH}
git pull git pull
prepare_content
fi fi
} }
prepare_content(){ prepare_content(){
if [ "${GEMINI_KILN_BUILD}" == "true" ]; then if [ "${GEMINI_KILN_BUILD}" == "true" ]; then
echo "Building content with kiln build ${GEMINI_KILN_SRC}" if [ "${GEMINI_KILN_SRC}" != "." ]; then
echo "Building content in ${GEMINI_GIT_PATH}/${GEMINI_KILN_SRC} with kiln build"
cd ${GEMINI_GIT_PATH}/${GEMINI_KILN_SRC}
else
echo "Building content in ${GEMINI_GIT_PATH} with kiln build"
cd ${GEMINI_GIT_PATH} cd ${GEMINI_GIT_PATH}
kiln build ${GEMINI_KILN_SRC} fi
kiln build
fi fi
} }
run_agate(){ run_agate(){
echo "---"
echo "* content: ${GEMINI_GTI_PATH}/${GEMINI_CONTENT_FOLDER}"
echo "* content langage: ${GEMINI_LANG}"
echo "* domain: gemini://${GEMINI_DOMAIN}:${GEMINI_PORT} "
echo "---"
/app/agate --content ${GEMINI_GIT_PATH}/${GEMINI_CONTENT_FOLDER} \ /app/agate --content ${GEMINI_GIT_PATH}/${GEMINI_CONTENT_FOLDER} \
--certs ${GEMINI_CERT_PATH} \ --certs ${GEMINI_CERT_PATH} \
--addr [::]:${GEMINI_PORT} \ --addr [::]:${GEMINI_PORT} \
@ -43,7 +54,7 @@ run_agate(){
default(){ default(){
if [ ! -f "${GEMINI_CERT_PATH}/cert.pem" ]; then if [ ! -f "${GEMINI_CERT_PATH}/cert.pem" ]; then
echo "No certs found in {GEMINI_CERT_PATH}. Creates new certificate." echo "No certs found in ${GEMINI_CERT_PATH}. Creates new certificate."
create_new_cert create_new_cert
fi fi
@ -54,7 +65,6 @@ default(){
update_repository update_repository
fi fi
echo "Starting agate for gemini://${GEMINI_DOMAIN}"
run_agate run_agate
} }