I'm running a containerized mongoDB database. After a lengthy set-up, a JS script is launched that logs changes to a collection via the watch() method.
I'm triggering the script through the shell of another auxiliary mongo container that I use for configuration. As the shell produces an output and the program runs indefinitely, both containers stay running in parallel.
Is that a bad ? Is there an overhead to it ? Is there a way to launch the script on the database proper and then shut-down the calling container ?
1.4m articles
1.4m replys
5 comments
57.0k users