mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-17 23:47:13 +00:00
sample Docker Compose configuration for Glances
This commit is contained in:
parent
fdbac4ebff
commit
f40e588e7d
@ -621,15 +621,37 @@ 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">
|
<>
|
||||||
<Label htmlFor="monitoringURL">Monitoring URL</Label>
|
<div className="grid w-full items-center gap-1.5">
|
||||||
<Input
|
<Label htmlFor="monitoringURL">Monitoring URL</Label>
|
||||||
id="monitoringURL"
|
<Input
|
||||||
type="text"
|
id="monitoringURL"
|
||||||
placeholder={`http://${ip}:61208`}
|
type="text"
|
||||||
onChange={(e) => setMonitoringURL(e.target.value)}
|
placeholder={`http://${ip}:61208`}
|
||||||
/>
|
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,16 +1098,38 @@ 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">
|
<>
|
||||||
<Label htmlFor="editMonitoringURL">Monitoring URL</Label>
|
<div className="grid w-full items-center gap-1.5">
|
||||||
<Input
|
<Label htmlFor="editMonitoringURL">Monitoring URL</Label>
|
||||||
id="editMonitoringURL"
|
<Input
|
||||||
type="text"
|
id="editMonitoringURL"
|
||||||
placeholder={`http://${editIp}:61208`}
|
type="text"
|
||||||
value={editMonitoringURL}
|
placeholder={`http://${editIp}:61208`}
|
||||||
onChange={(e) => setEditMonitoringURL(e.target.value)}
|
value={editMonitoringURL}
|
||||||
/>
|
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>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user