I'm having trouble running uvicorn on a unix socket with...
I have tried the below plus every combination I can think of, both in the command line and in systemd Unit file as well...
env/bin/uvicorn appname.asgi:application --uds unix:/run/uvicorn/appname.sock
and every other combination produces a FileNotFoundError: [Errno 2] No such file or directory
, but the directory is there...
Am I missing something here? I am not an expert in Ubuntu or systemd, but I was able to set up Nginx and uWSGI pretty easily.
Well... as it turns out, it was much simpler than I though:
The solution is to NOT use the unix:
prefix, only the location of the socket, e.g.:
venv/bin/uvicorn appname.asgi:application --uds /run/uvicorn/appname.sock
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With