sample Docker Compose configuration for Glances

This commit is contained in:
headlessdev 2025-04-20 23:39:54 +02:00
parent fdbac4ebff
commit f40e588e7d

View File

@ -621,6 +621,7 @@ export default function Dashboard() {
<Label htmlFor="monitoringCheckbox">Enable monitoring</Label> <Label htmlFor="monitoringCheckbox">Enable monitoring</Label>
</div> </div>
{monitoring && ( {monitoring && (
<>
<div className="grid w-full items-center gap-1.5"> <div className="grid w-full items-center gap-1.5">
<Label htmlFor="monitoringURL">Monitoring URL</Label> <Label htmlFor="monitoringURL">Monitoring URL</Label>
<Input <Input
@ -630,6 +631,27 @@ export default function Dashboard() {
onChange={(e) => setMonitoringURL(e.target.value)} onChange={(e) => setMonitoringURL(e.target.value)}
/> />
</div> </div>
<div className="mt-4 p-4 border rounded-lg bg-muted">
<h4 className="text-sm font-semibold mb-2">Required Server Setup</h4>
<p className="text-sm text-muted-foreground mb-3">
To enable monitoring, you need to install Glances on your server. Here's an example Docker Compose configuration:
</p>
<pre className="bg-background p-4 rounded-md text-sm">
<code>{`services:
glances:
image: nicolargo/glances:latest
container_name: glances
restart: unless-stopped
ports:
- "61208:61208"
pid: "host"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- GLANCES_OPT=-w --disable-webui`}</code>
</pre>
</div>
</>
)} )}
</div> </div>
</TabsContent> </TabsContent>
@ -1076,6 +1098,7 @@ export default function Dashboard() {
<Label htmlFor="editMonitoringCheckbox">Enable monitoring</Label> <Label htmlFor="editMonitoringCheckbox">Enable monitoring</Label>
</div> </div>
{editMonitoring && ( {editMonitoring && (
<>
<div className="grid w-full items-center gap-1.5"> <div className="grid w-full items-center gap-1.5">
<Label htmlFor="editMonitoringURL">Monitoring URL</Label> <Label htmlFor="editMonitoringURL">Monitoring URL</Label>
<Input <Input
@ -1086,6 +1109,27 @@ export default function Dashboard() {
onChange={(e) => setEditMonitoringURL(e.target.value)} onChange={(e) => setEditMonitoringURL(e.target.value)}
/> />
</div> </div>
<div className="mt-4 p-4 border rounded-lg bg-muted">
<h4 className="text-sm font-semibold mb-2">Required Server Setup</h4>
<p className="text-sm text-muted-foreground mb-3">
To enable monitoring, you need to install Glances on your server. Here's an example Docker Compose configuration:
</p>
<pre className="bg-background p-4 rounded-md text-sm">
<code>{`services:
glances:
image: nicolargo/glances:latest
container_name: glances
restart: unless-stopped
ports:
- "61208:61208"
pid: "host"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- GLANCES_OPT=-w --disable-webui`}</code>
</pre>
</div>
</>
)} )}
</div> </div>
</TabsContent> </TabsContent>