[feat]: long running docker containers for more pervasive `inject` actions
Reason
Possibility of sending commands to a running exec. (nice utils for json) Need to have callbacks or something for the exec
Not thrashing the network interfaces when a service is crashing is very valuable.
Keeping the container on a single ip is quite useful.
Possible long running docker exec <services>.embassy sh and put in commands via the stdin.
About
run a sleep action as the entrypoint to the container and inject the main action
this will allow all actions to be inject, therefore massively improving the performance
the main difficulty here is managing mountpoints into the container, we may have to do clever runtime binds
Code Notes
Every mount change (service install/ uninstall), re run infinite sleep main image For pointers that don't exists, create folder + mount No entry point probably for most images, call the entry point for the main, and do an exec Entrypoint is sleep infinity, main is the entrypoint in main New js command: Docker exec service.embassy Need to have a better docker kill, we don't want to kill $pid Don't use docker status for lifecycle Docker procedure that is inject only, + no mounts (Top level) + no image If main is not InjectOnly, Main gets namespace
Backend Checks
- [x] Ensure we can stop/ start the service
- [x] Ensure we can uninstall
- [x] Ensure we can backup
- [x] Ensure that new mounts mean it restarts? Or doesn't need
- [x] Restart for service works
UI / UX Effects
- [x] Check that most services work off
- [x] Check that most services work on
- [x] Check that most services will restart on error
- [x] Checking installing new service will mount or not need to
- [x] Checking uninstall new service will unmount
- [x] Check Inject true will work when service is stopped
- [x] Check old inject + non inject work the same
Modifed in About