diff --git a/.containerignore b/.containerignore index cb19d53..1f26113 100644 --- a/.containerignore +++ b/.containerignore @@ -29,4 +29,7 @@ dist-ssr uploads/ .env +poems.txt +poem_pic/ + __pycache__ \ No newline at end of file diff --git a/.gitignore b/.gitignore index cb19d53..a6bbd50 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,6 @@ dist-ssr uploads/ .env +poem_pic/ + __pycache__ \ No newline at end of file diff --git a/README.md b/README.md index b546806..db0fda9 100644 --- a/README.md +++ b/README.md @@ -35,5 +35,5 @@ Only docker/podman are required ```sh docker build . -t porridger:build -docker run --name porridger -p 8000:8000 -v ./sql_app.db:/srv/sql_app.db -v uploads:/srv/uploads -v poem_pic:/srv/poem_pic porridger:build +docker run --name porridger -p 8000:8000 -v ./sql_app.db:/srv/sql_app.db -v ./poems.txt:/srv/poems.txt -v ./poem_pic:/srv/poem_pic -v uploads:/srv/uploads porridger:build ``` diff --git a/back/add_poems_and_filters.py b/back/add_poems_and_filters.py index 9380918..61e5fa4 100644 --- a/back/add_poems_and_filters.py +++ b/back/add_poems_and_filters.py @@ -10,7 +10,7 @@ import datetime # Загружаем стихи async def add_poems_to_db(async_db: AsyncSession): - f1 = open('text121.txt', encoding='utf-8', mode='r')#открыть фаил для чтения на русском + f1 = open('poems.txt', encoding='utf-8', mode='r')#открыть фаил для чтения на русском for a in range(1, 110): f1.seek(0)#перейти к началу i=0 diff --git a/back/api.py b/back/api.py index 2a038c0..32e8cb6 100644 --- a/back/api.py +++ b/back/api.py @@ -46,7 +46,7 @@ app.mount("/uploads", StaticFiles(directory = "./uploads")) # эндпоинт для возвращения согласия в pdf @app.get("/privacy_policy.pdf") async def privacy_policy(): - return FileResponse("privacy_policy.pdf") + return FileResponse("./privacy_policy.pdf") # получение списка объявлений @app.get("/api/announcements", response_model=List[pydantic_schemas.Announcement])#адрес объявлений diff --git a/text121.txt b/poems.txt similarity index 100% rename from text121.txt rename to poems.txt diff --git a/privacy_policy.pdf b/privacy_policy.pdf new file mode 100644 index 0000000..b4aa2a4 Binary files /dev/null and b/privacy_policy.pdf differ