diff --git a/entrypoint.sh b/entrypoint.sh index 9101c34..f64dc01 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -20,19 +20,30 @@ update_repository(){ else cd ${GEMINI_GIT_PATH} git pull - prepare_content fi } prepare_content(){ if [ "${GEMINI_KILN_BUILD}" == "true" ]; then - echo "Building content with kiln build ${GEMINI_KILN_SRC}" - cd ${GEMINI_GIT_PATH} - 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} + fi + + kiln build fi } 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} \ --certs ${GEMINI_CERT_PATH} \ --addr [::]:${GEMINI_PORT} \ @@ -43,7 +54,7 @@ run_agate(){ default(){ 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 fi @@ -54,7 +65,6 @@ default(){ update_repository fi - echo "Starting agate for gemini://${GEMINI_DOMAIN}" run_agate }