This commit is contained in:
2023-05-06 00:12:30 +02:00
parent db14333f06
commit 179ac44d7d
24 changed files with 98 additions and 48 deletions

View File

@@ -1,5 +1,6 @@
from fastapi import FastAPI
from fastapi.responses import ORJSONResponse
from fastapi_pagination import add_pagination
from prometheus_fastapi_instrumentator import Instrumentator
from redis import asyncio as aioredis
@@ -9,6 +10,7 @@ from app.views import routers
from core.config import env_config
from core.db import database
sentry_sdk.init(
env_config.SENTRY_SDN,
)

View File

@@ -1,3 +1,4 @@
from fastapi.security import APIKeyHeader
default_security = APIKeyHeader(name="Authorization")

View File

@@ -5,6 +5,7 @@ from sqlalchemy import MetaData
from core.config import env_config
DATABASE_URL = (
f"postgresql://{env_config.POSTGRES_USER}:{quote(env_config.POSTGRES_PASSWORD)}@"
f"{env_config.POSTGRES_HOST}:{env_config.POSTGRES_PORT}/{env_config.POSTGRES_DB}"