3 ms·
That's default behavior. Docker tracks the main process. If it dies, and your database is not the main process, then the entire container will be restarted (dep
by avaika 6y ago
That's default behavior. Docker tracks the main process. If it dies, and your database is not the main process, then the entire container will be restarted (depends on configuration). Means your database will be forcefully killed. At some point you might run into data corruption incident.
If you make database your main process, then docker will be blind for your application death.
- TekMol 6y agoI would make neither the main process. A dedicated server also does not restart if my DB or my application dies.
- avaika 6y agoThat's why I mentioned that if you want to put multiple applications inside a single container, you have to put it under supervisord or alternative. So neither would be the main process.