@aifabrix/builder 2.47.3 → 2.47.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app/down.js +3 -20
- package/package.json +1 -1
package/lib/app/down.js
CHANGED
|
@@ -18,13 +18,10 @@ const logger = require('../utils/logger');
|
|
|
18
18
|
const config = require('../core/config');
|
|
19
19
|
const helpers = require('./run-helpers');
|
|
20
20
|
const { validateAppName } = require('./push');
|
|
21
|
-
const buildCopy = require('../utils/build-copy');
|
|
22
21
|
const {
|
|
23
22
|
getCeleryCompanionAppKeys,
|
|
24
23
|
loadBuilderApplicationConfig
|
|
25
24
|
} = require('../utils/celery-companion-apps');
|
|
26
|
-
const fsSync = require('fs');
|
|
27
|
-
const path = require('path');
|
|
28
25
|
|
|
29
26
|
/**
|
|
30
27
|
* Executes a shell command asynchronously.
|
|
@@ -105,23 +102,9 @@ async function removeAppVolumes(appName, developerId) {
|
|
|
105
102
|
}
|
|
106
103
|
|
|
107
104
|
async function stopAppContainers(appName, companionKeys, developerId) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
if (companionKeys.length > 0 && fsSync.existsSync(composePath)) {
|
|
112
|
-
try {
|
|
113
|
-
await execAsync(`docker compose -f "${composePath}" down`);
|
|
114
|
-
return;
|
|
115
|
-
} catch (composeErr) {
|
|
116
|
-
logger.log(chalk.gray(`Compose down: ${composeErr.message}; stopping containers individually`));
|
|
117
|
-
for (const companionKey of companionKeys) {
|
|
118
|
-
await helpers.stopAndRemoveContainer(companionKey, developerId, false);
|
|
119
|
-
}
|
|
120
|
-
await helpers.stopAndRemoveContainer(appName, developerId, false);
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
105
|
+
// Stop by container name — not `docker compose down` on the shared applications-dev-*
|
|
106
|
+
// compose file. That file may only list another app (e.g. miso-controller) while
|
|
107
|
+
// dataplane worker/beat containers are still running from an earlier compose state.
|
|
125
108
|
await helpers.stopAndRemoveContainer(appName, developerId, false);
|
|
126
109
|
for (const companionKey of companionKeys) {
|
|
127
110
|
await helpers.stopAndRemoveContainer(companionKey, developerId, false);
|