I am running a fast api and when i was developing i had the following piece of code in my app.py file
code in app.py:
import uvicorn
if __name__=="__main__":
uvicorn.run("app.app:app",host='0.0.0.0', port=4557, reload=True, debug=True, workers=3)
so i was about to run CMD ["python3","app.py"] in my Dockerfile.
on the fastapi example they did something like this :
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
I want to know what is the difference between these two methods as i think both of them will work.