https://pantsbuild.org/ logo
g

gorgeous-eve-12553

12/03/2022, 5:41 PM
If I have a PEX that supports
restartable=True
and can hot-reload, how do I do the same when running in a docker image?
h

happy-kitchen-89482

12/04/2022, 1:54 AM
Not sure I understand the question… Can you give more details on what you’re looking to accomplish?
g

gorgeous-eve-12553

12/06/2022, 2:58 PM
I'm running a FastApi + unicorn app using hot reloading. When I run this locally, I can save my code and uvicorn reloads the app without having to stop and start the process again. When I add restartable=true to my pex_build I get the same thing where my code changes are synced into the already running pex and uvicorn detects the changes and reloads in place. But when I take that same pex and put it in docker I suddenly lose hot-reloading functionality. I'll build you a sample app later tonight so you have something to run and look at, I'm sure my issue has an obvious solution somewhere.
w

wide-midnight-78598

12/06/2022, 3:03 PM
Is your Docker instance being used for hot reloading code changes as well? And docker is monitoring your filesystem?
6 Views