lab4: s3 attachments, private bucket, healthchecks, tests and report
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
"""Entry point: uvicorn as PID 1 with env-driven host/port and graceful shutdown."""
|
||||
import os
|
||||
|
||||
import uvicorn
|
||||
|
||||
from .main import app
|
||||
|
||||
|
||||
def main() -> None:
|
||||
host = os.environ.get("APP_HOST", "0.0.0.0")
|
||||
port = int(os.environ.get("APP_PORT", "8080"))
|
||||
uvicorn.run(
|
||||
app,
|
||||
host=host,
|
||||
port=port,
|
||||
log_level="info",
|
||||
access_log=True,
|
||||
timeout_keep_alive=2,
|
||||
timeout_graceful_shutdown=5,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user