mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-04-05 16:26:15 +02:00
feat: add dozzle for enhanced logs and metrics
This commit is contained in:
parent
033cc10420
commit
b677fbbe81
|
|
@ -4,14 +4,17 @@ import { Bars3Icon, XMarkIcon } from '@heroicons/react/24/outline'
|
||||||
import classNames from '~/lib/classNames'
|
import classNames from '~/lib/classNames'
|
||||||
import { IconArrowLeft } from '@tabler/icons-react'
|
import { IconArrowLeft } from '@tabler/icons-react'
|
||||||
|
|
||||||
|
type SidebarItem = {
|
||||||
|
name: string
|
||||||
|
href: string
|
||||||
|
icon?: React.ElementType
|
||||||
|
current: boolean
|
||||||
|
target?: string
|
||||||
|
}
|
||||||
|
|
||||||
interface StyledSidebarProps {
|
interface StyledSidebarProps {
|
||||||
title: string
|
title: string
|
||||||
items: Array<{
|
items: SidebarItem[]
|
||||||
name: string
|
|
||||||
href: string
|
|
||||||
icon?: React.ElementType
|
|
||||||
current: boolean
|
|
||||||
}>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const StyledSidebar: React.FC<StyledSidebarProps> = ({ title, items }) => {
|
const StyledSidebar: React.FC<StyledSidebarProps> = ({ title, items }) => {
|
||||||
|
|
@ -22,16 +25,12 @@ const StyledSidebar: React.FC<StyledSidebarProps> = ({ title, items }) => {
|
||||||
return window.location.pathname
|
return window.location.pathname
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const ListItem = (item: {
|
const ListItem = (item: SidebarItem) => {
|
||||||
name: string
|
|
||||||
href: string
|
|
||||||
icon?: React.ElementType
|
|
||||||
current: boolean
|
|
||||||
}) => {
|
|
||||||
return (
|
return (
|
||||||
<li key={item.name}>
|
<li key={item.name}>
|
||||||
<a
|
<a
|
||||||
href={item.href}
|
href={item.href}
|
||||||
|
target={item.target}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
item.current
|
item.current
|
||||||
? 'bg-desert-green text-white'
|
? 'bg-desert-green text-white'
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,14 @@ import {
|
||||||
FolderIcon,
|
FolderIcon,
|
||||||
MagnifyingGlassIcon,
|
MagnifyingGlassIcon,
|
||||||
} from '@heroicons/react/24/outline'
|
} from '@heroicons/react/24/outline'
|
||||||
import { IconGavel } from '@tabler/icons-react'
|
import { IconDashboard, IconGavel } from '@tabler/icons-react'
|
||||||
import StyledSidebar from '~/components/StyledSidebar'
|
import StyledSidebar from '~/components/StyledSidebar'
|
||||||
|
import { getServiceLink } from '~/lib/navigation'
|
||||||
|
|
||||||
const navigation = [
|
const navigation = [
|
||||||
{ name: 'Apps', href: '/settings/apps', icon: CommandLineIcon, current: false },
|
{ name: 'Apps', href: '/settings/apps', icon: CommandLineIcon, current: false },
|
||||||
{ name: 'Legal Notices', href: '/settings/legal', icon: IconGavel, current: false },
|
{ name: 'Legal Notices', href: '/settings/legal', icon: IconGavel, current: false },
|
||||||
|
{ name: 'Service Logs & Metrics', href: getServiceLink('9999'), icon: IconDashboard, current: false, target: '_blank' },
|
||||||
{ name: 'ZIM Manager', href: '/settings/zim', icon: FolderIcon, current: false },
|
{ name: 'ZIM Manager', href: '/settings/zim', icon: FolderIcon, current: false },
|
||||||
{
|
{
|
||||||
name: 'Zim Remote Explorer',
|
name: 'Zim Remote Explorer',
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,17 @@ services:
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
dozzle:
|
||||||
|
image: amir20/dozzle:latest
|
||||||
|
container_name: nomad_dozzle
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "9999:8080"
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock # Allows Dozzle to read logs from the Host's Docker daemon
|
||||||
|
environment:
|
||||||
|
- DOZZLE_ENABLE_ACTIONS=true # Enables the action buttons (restart, stop, etc.)
|
||||||
|
- DOZZLE_ENABLE_SHELL=true # Enables web-based shell access
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:8.0
|
image: mysql:8.0
|
||||||
container_name: nomad_mysql
|
container_name: nomad_mysql
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user