diff --git a/Dockerfile b/Dockerfile index adeb335..7201e88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python +FROM python:alpine WORKDIR /srv diff --git a/README.md b/README.md index d289994..1827be1 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Simple docker deployment docker build . -t publite_backend # run it with docker -docker run -p :80 publite_backend +docker run -p :8081 publite_backend ``` Dokku deployment with image from Docker Hub diff --git a/app/fb2.py b/app/fb2.py index 7300d8a..66ffecb 100644 --- a/app/fb2.py +++ b/app/fb2.py @@ -115,7 +115,7 @@ def get_author(author: Element) -> str: "last-name", ): tag = author.find("./" + tag_name, namespaces) - if tag is not None: + if tag is not None and tag.text is not None: res.append(tag.text) if len(res) == 0: res = author.find("./nickname", namespaces).text diff --git a/app/utils.py b/app/utils.py index f14c18a..4099e77 100644 --- a/app/utils.py +++ b/app/utils.py @@ -17,7 +17,7 @@ class HTMLBook(BaseModel): # pylint: disable=too-few-public-methods title: str author: str - cover: Optional[str] + cover: Optional[str] = None content: str