Fix Docker status: treat 'created' as offline, not starting
All checks were successful
Deploy GSM / deploy (push) Successful in 23s
All checks were successful
Deploy GSM / deploy (push) Successful in 23s
Container status 'created' means it was never started yet (e.g. after docker create during update), so it should show as offline. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -72,9 +72,9 @@ export async function getServerStatus(server) {
|
||||
const result = await ssh.execCommand(`docker inspect --format='{{.State.Status}}' ${server.containerName} 2>/dev/null`);
|
||||
const status = result.stdout.trim();
|
||||
if (status === 'running') return 'online';
|
||||
if (status === 'restarting' || status === 'created') return 'starting';
|
||||
if (status === 'restarting') return 'starting';
|
||||
if (status === 'removing' || status === 'paused') return 'stopping';
|
||||
return 'offline';
|
||||
return 'offline'; // includes 'created', 'exited', 'dead'
|
||||
} else if (server.runtime === 'systemd') {
|
||||
const result = await ssh.execCommand(`systemctl is-active ${server.serviceName}`);
|
||||
const status = result.stdout.trim();
|
||||
|
||||
Reference in New Issue
Block a user