@jacebenson/jsn 4.3.7-dev.25 → 4.3.7-dev.26
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/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import { confirmDelete, formatRecordForDisplay, getStringField, interactiveList,
|
|
|
3
3
|
import { FormatAuto } from '../output.js';
|
|
4
4
|
import { declareCapabilities } from '../capabilities.js';
|
|
5
5
|
import { resolveRecord, unwrapSysId } from '../resolve-record.js';
|
|
6
|
-
import { detectDocker, installDockerMidServer, validateMidCredentials } from '../midserver-install.js';
|
|
6
|
+
import { detectDocker, defaultRun, installDockerMidServer, validateMidCredentials } from '../midserver-install.js';
|
|
7
7
|
|
|
8
8
|
const AGENT_TABLE = 'ecc_agent';
|
|
9
9
|
const QUEUE_TABLE = 'ecc_queue';
|
|
@@ -250,6 +250,7 @@ export function midserversCmd(wrap) {
|
|
|
250
250
|
]
|
|
251
251
|
: dockerStatus.installed && dockerStatus.compose
|
|
252
252
|
? [
|
|
253
|
+
{ name: 'Run with sudo', value: 'sudo' },
|
|
253
254
|
{ name: 'Prepare files now, run Docker later', value: 'prepare' },
|
|
254
255
|
{ name: 'Direct install (not available yet)', value: 'direct' },
|
|
255
256
|
]
|
|
@@ -267,8 +268,13 @@ export function midserversCmd(wrap) {
|
|
|
267
268
|
name,
|
|
268
269
|
releaseName: credentials.releaseName,
|
|
269
270
|
directory: argv.directory,
|
|
270
|
-
runNow:
|
|
271
|
+
runNow: false,
|
|
271
272
|
});
|
|
273
|
+
if (installMethod === 'sudo') {
|
|
274
|
+
defaultRun('sudo', ['systemctl', 'start', 'docker']);
|
|
275
|
+
defaultRun('sudo', ['docker', 'compose', '-f', installation.composePath, 'up', '-d'], { cwd: installation.installDir });
|
|
276
|
+
installation.prepared = false;
|
|
277
|
+
}
|
|
272
278
|
if (installation.prepared) {
|
|
273
279
|
app.ok(installation, { summary: `Prepared MID Server files in ${installation.installDir}. Run: ${installation.runCommand}` });
|
|
274
280
|
return;
|