Add systemd service and switch app to port 80
Add c2.service unit to run the FastAPI app as workshop-c2. The unit invokes uv via /usr/bin/env, sets PATH and PYTHONUNBUFFERED, enables automatic restarts with a short backoff, and logs to the journal using SyslogIdentifier. Also update main.py's runtime invocation
This commit is contained in:
parent
3ea31027f1
commit
38e46a3c50
2 changed files with 29 additions and 1 deletions
2
main.py
2
main.py
|
|
@ -108,4 +108,4 @@ async def root():
|
|||
|
||||
if __name__ == "__main__":
|
||||
# Run with: python main.py
|
||||
uvicorn.run("main:app", host="0.0.0.0", port=8000, log_level="info")
|
||||
uvicorn.run("main:app", host="0.0.0.0", port=80, log_level="info")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue