I deploy my fast api on aws ec2 but the problem is I need to manually run python3 -m uvicorn main:app
for start my fastapi app and if I close the terminal my fastapi app are not accessible from aws public ip.
here is ngnix config:
server {
listen 80;
server_name aws ip;
location / {
proxy_pass http://127.0.0.1:8000;
}
}