Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"watch" function, to restart on file/folder changes #13

Open
thim81 opened this issue Jun 12, 2019 · 3 comments
Open

"watch" function, to restart on file/folder changes #13

thim81 opened this issue Jun 12, 2019 · 3 comments

Comments

@thim81
Copy link
Contributor

thim81 commented Jun 12, 2019

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

@reddec
Copy link
Owner

reddec commented Jun 12, 2019

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

@thim81
Copy link
Contributor Author

thim81 commented Jun 13, 2019

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?

@reddec
Copy link
Owner

reddec commented Jun 13, 2019

Hi Thim!

I will very appreciate it

@thim81 thim81 changed the title Question: Restart on ENV var changes Feature request: Add "watch" function, to restart on file/folder changes Jun 13, 2019
@thim81 thim81 changed the title Feature request: Add "watch" function, to restart on file/folder changes "watch" function, to restart on file/folder changes Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants