Closed sthulb closed 4 years ago
Yeah, I was thinking of adding a watch
mode for the init go binary that just handles this automatically
In any case, it would only work for newer rapid-based runtimes where init
is the one loading the user's code – older runtimes (in docker-lambda at least) use a slightly inverted method, and each has custom handler loading code which I think would be safest reloaded just by restarting the docker container (as currently suggested in the README)
I've added this, as well as a watch mode which you can activate by passing in DOCKER_LAMBDA_WATCH=1
Thanks for the nudge 👍
Watch mode documented here: https://github.com/lambci/docker-lambda#developing-in-stay-open-mode
It would be cool if the init go binary understood signals, a user could run
docker kill --signal HUP <container>
to refresh the handler code.This pattern is used by nginx too