create-directus-docker 1.4.2 → 1.4.3
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
|
@@ -111,27 +111,36 @@ export default function launchServices() {
|
|
|
111
111
|
//It may be that it's running, so let's be sure.
|
|
112
112
|
logUpdate('Directus taking a long time to respond...');
|
|
113
113
|
|
|
114
|
-
const check = spawn('docker-compose', ['ps', '--format', 'json']);
|
|
114
|
+
const check = spawn('docker-compose', ['ps', '-a', '--format', 'json']);
|
|
115
115
|
|
|
116
116
|
check.stdout.on('data', (data) => {
|
|
117
117
|
const q = 'map(select(.Name == "directus")) | .[0] | {Name: .Name, Service: .Service, State: .State}';
|
|
118
118
|
jq.run(q, data.toString(), { input: 'string' })
|
|
119
119
|
.then((data) => {
|
|
120
120
|
const json = JSON.parse(data);
|
|
121
|
+
console.log(data);
|
|
121
122
|
|
|
122
123
|
if(json.State == 'running') {
|
|
123
124
|
logUpdate(`${chalk.yellowBright("Directus appears to be running, but took a while to respond.")}`);
|
|
124
125
|
console.log(`Just run ${chalk.greenBright("npm run launch")} to verify, and you should be good to go.`);
|
|
125
126
|
logUpdate.done();
|
|
126
|
-
process.exit(1);
|
|
127
127
|
} else {
|
|
128
|
+
logUpdate(`${chalk.redBright("Directus taking too long to respond. You may need to manually start it.")}`);
|
|
128
129
|
logUpdate.done();
|
|
129
|
-
console.log(`${chalk.redBright("Directus taking too long to respond. You may need to manually start it.")}`);
|
|
130
130
|
console.log(`Just run ${chalk.greenBright("npm run launch")} and you should be good to go.`);
|
|
131
|
-
process.exit(1);
|
|
132
131
|
}
|
|
133
132
|
});
|
|
134
133
|
});
|
|
134
|
+
|
|
135
|
+
check.on('close', (code) => {
|
|
136
|
+
if (code !== 0) {
|
|
137
|
+
console.log(`${chalk.redBright("Directus taking too long to respond. You may need to manually start it.")}`);
|
|
138
|
+
console.log(`Just run ${chalk.greenBright("npm run launch")} and you should be good to go.`);
|
|
139
|
+
} else {
|
|
140
|
+
console.log(`${chalk.yellowBright("Directus appears to be running, but took a while to respond.")}`);
|
|
141
|
+
console.log(`Just run ${chalk.greenBright("npm run launch")} to verify, and you should be good to go.`);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
135
144
|
});
|
|
136
145
|
});
|
|
137
146
|
});
|