Skip to content

Uvicorn does not reload when changes on docker mounted volume in WSL #1893

Discussion options

You must be logged in to vote

Hello,
I finally solved this.
The issue is that the working directory inside the Docker container was /, and it seems that reloading does not work in that case.

Changing the workdir to /app, setting PYTHONPATH to /, and launching with uvicorn app.main:app --host 0.0.0.0 --port 8080 --reload works as intended.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rsurgiewicz
Comment options

Answer selected by Kludex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants