monexec
monexec copied to clipboard
"watch" function, to restart on file/folder changes
Hi Reddec,
It would be interesting to automatically restart a service application when a file is modified or if there are changes in a directory or its subdirectories:
Example file watch:
monexec ... --watch ./app.js
Example folder watch
monexec ... --watch ./code
and in the YAML file
services:
- label: Netcat Sample Service
command: nc args: - -l - "9000"
stop_timeout: 5s
restart_delay: 5s
watch: ./app.js
Potentially in the future, there could be extensions, like "files to ignore"
Regards, Tim
Hi Thim!
No, there is no flag for that. Environment variables basically can not be changed after container launch without very specific instruments that more suitable for hackers than for normal usage patterns.
However, I can add a monitor that will watch changes for the .env files and for config files.
Can you specify priority? I am a bit busy now but if it's critical or high-priority I can implement quite fast
Hi Reddec,
It is not urgent, so take your time. And perhaps I should rephrase the feature to indeed more of a file/folder watch logic.
Shall I modify the title and my orginal request, so that it is more related to this feature?
Hi Thim!
I will very appreciate it