1
0
mirror of https://github.com/ijaric/voice_assistant.git synced 2025-05-24 06:23:28 +00:00

Minor fixes

This commit is contained in:
Григорич 2023-09-22 16:08:51 +03:00
parent db1a2b0683
commit 0400d771e7
3 changed files with 4 additions and 6 deletions

View File

@ -5,7 +5,8 @@ WORKDIR /opt/app
ENV PYTHONPATH '/opt/app'
COPY pyproject.toml ./
RUN pip install poetry \
RUN pip install poetry \
&& poetry config virtualenvs.create false \
&& poetry install --no-dev
COPY bin bin

View File

@ -4,4 +4,4 @@ while ! (echo > /dev/tcp/db/5432) >/dev/null 2>&1; do
sleep 1
done
exec .venv/bin/python -m bin
exec python -m bin

View File

@ -5,14 +5,11 @@ from pydantic import ValidationError
from lib.api.v1 import schemas as app_schemas
from lib.app import settings as app_settings
app = fastapi.FastAPI()
settings = app_settings.get_settings()
security = fastapi.security.HTTPBearer()
def get_token_data(
authorization: fastapi.security.HTTPAuthorizationCredentials = fastapi.Security(security),
authorization: fastapi.security.HTTPAuthorizationCredentials = fastapi.Security(fastapi.security.HTTPBearer()),
) -> app_schemas.entity.Token:
token = authorization.credentials
try: