remove nginx config of stopped apps

when the cert of a stopped app gets auto-cleaned up, nginx does not
start anymore since the config references the cert.

there are two possible fixes:
* do not cleanup cert of stopped apps
* remove the nginx config of stopped apps

this implements the second approach
This commit is contained in:
Girish Ramakrishnan
2022-01-28 09:52:03 -08:00
parent ee3d1b3697
commit 5382e3d832
3 changed files with 3 additions and 0 deletions
+1
View File
@@ -689,6 +689,7 @@ async function stop(app, args, progressCallback) {
assert.strictEqual(typeof progressCallback, 'function');
await progressCallback({ percent: 20, message: 'Stopping container' });
await reverseProxy.unconfigureApp(app); // removing nginx configs also means that we can auto-cleanup old certs since they are not referenced
await docker.stopContainers(app.id);
await progressCallback({ percent: 50, message: 'Stopping app services' });