Hi! I'm working on a system that uses a bunch of different nameko services
which we run in development using docker compose and the nameko run
command. Is there a recommended way to make services auto-reload on code
changes? I've looked through the documentation and mailing list, but
haven't found an answer (which makes me think I may be missing something
obvious).
You're not missing anything obvious I'm afraid. There isn't anything
built-in at the moment for auto-reload. You might be able to pull something
together yourself using a library
like watchdog · PyPI or similar.
Best,
David
···
On Saturday, 16 July 2016 23:05:56 UTC+1, je...@pollak.io wrote:
Hi! I'm working on a system that uses a bunch of different nameko services
which we run in development using docker compose and the nameko run
command. Is there a recommended way to make services auto-reload on code
changes? I've looked through the documentation and mailing list, but
haven't found an answer (which makes me think I may be missing something
obvious).
My solution is inspired by Django implementation and uses *os.stat* which
is probably not ideal. You can see the changes required here:
Hope this helps.
Jakub
···
On Sunday, 17 July 2016 18:57:09 UTC+1, David Szotten wrote:
Hi Jesse,
You're not missing anything obvious I'm afraid. There isn't anything
built-in at the moment for auto-reload. You might be able to pull something
together yourself using a library like watchdog · PyPI or similar.
Best,
David
On Saturday, 16 July 2016 23:05:56 UTC+1, je...@pollak.io wrote:
Hi! I'm working on a system that uses a bunch of different nameko
services which we run in development using docker compose and the nameko
run command. Is there a recommended way to make services auto-reload on
code changes? I've looked through the documentation and mailing list, but
haven't found an answer (which makes me think I may be missing something
obvious).
On Sunday, 17 July 2016 18:57:09 UTC+1, David Szotten wrote:
Hi Jesse,
You're not missing anything obvious I'm afraid. There isn't anything
built-in at the moment for auto-reload. You might be able to pull something
together yourself using a library like watchdog · PyPI or similar.
Best,
David
On Saturday, 16 July 2016 23:05:56 UTC+1, je...@pollak.io wrote:
Hi! I'm working on a system that uses a bunch of different nameko
services which we run in development using docker compose and the nameko
run command. Is there a recommended way to make services auto-reload on
code changes? I've looked through the documentation and mailing list, but
haven't found an answer (which makes me think I may be missing something
obvious).
On Sunday, 17 July 2016 18:57:09 UTC+1, David Szotten wrote:
Hi Jesse,
You're not missing anything obvious I'm afraid. There isn't anything
built-in at the moment for auto-reload. You might be able to pull something
together yourself using a library like watchdog · PyPI or similar.
Best,
David
On Saturday, 16 July 2016 23:05:56 UTC+1, je...@pollak.io wrote:
Hi! I'm working on a system that uses a bunch of different nameko
services which we run in development using docker compose and the nameko
run command. Is there a recommended way to make services auto-reload on
code changes? I've looked through the documentation and mailing list, but
haven't found an answer (which makes me think I may be missing something
obvious).
In my search of a autoreload feature, I have found entr, which is available in most package managers, language agnostic, and works with docker without problems.
Example of use: ls *.py | entr -r nameko run --config config.yml myservice
Nameko reloader didn’t work for me because it doesn’t laod config with environment variables.
Also, nameko extras exists, but I haven’t tested it.
Edit: Sorry for necroposting, but this was my first google result when searching nameko autoreload >:P