feat: add Docker support and update Python version to 3.11
This commit is contained in:
11
main.py
11
main.py
@@ -36,16 +36,7 @@ async def lifespan(app: FastAPI):
|
||||
consumer_task.cancel()
|
||||
|
||||
|
||||
app = FastAPI(lifespan=lifespan, separate_input_output_schemas=False)
|
||||
|
||||
if platform.system() == 'Linux':
|
||||
import uvicorn.workers
|
||||
|
||||
|
||||
class Worker(uvicorn.workers.UvicornWorker):
|
||||
CONFIG_KWARGS = {
|
||||
'root_path': API_ROOT
|
||||
}
|
||||
app = FastAPI(lifespan=lifespan, separate_input_output_schemas=False, root_path='/api')
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
|
||||
Reference in New Issue
Block a user