Compare commits

...

2 Commits
1.0.2 ... main

Author SHA1 Message Date
f80673ade2
Deployed to vercel 2023-09-18 15:38:58 +03:00
87e5a16a06
Fixed empty cover error
Updated deployment instructions
Switched to alpine python image
2023-09-17 16:40:26 +03:00
7 changed files with 12 additions and 5 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
.venv
__pycache__/
.vscode
.vscode
.vercel

View File

@ -1,4 +1,4 @@
FROM python
FROM python:alpine
WORKDIR /srv

View File

@ -42,7 +42,7 @@ Simple docker deployment
docker build . -t publite_backend
# run it with docker
docker run -p <port>:80 publite_backend
docker run -p <port>:8081 publite_backend
```
Dokku deployment with image from Docker Hub

1
api Symbolic link
View File

@ -0,0 +1 @@
app

View File

@ -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

View File

@ -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

5
vercel.json Normal file
View File

@ -0,0 +1,5 @@
{
"rewrites": [
{ "source": "/(.*)", "destination": "/api/main"}
]
}