Skip to content

Commit b677fbb

Browse files
committed
feat: add dozzle for enhanced logs and metrics
1 parent 033cc10 commit b677fbb

File tree

3 files changed

+25
-13
lines changed

3 files changed

+25
-13
lines changed

admin/inertia/components/StyledSidebar.tsx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ import { Bars3Icon, XMarkIcon } from '@heroicons/react/24/outline'
44
import classNames from '~/lib/classNames'
55
import { IconArrowLeft } from '@tabler/icons-react'
66

7+
type SidebarItem = {
8+
name: string
9+
href: string
10+
icon?: React.ElementType
11+
current: boolean
12+
target?: string
13+
}
14+
715
interface StyledSidebarProps {
816
title: string
9-
items: Array<{
10-
name: string
11-
href: string
12-
icon?: React.ElementType
13-
current: boolean
14-
}>
17+
items: SidebarItem[]
1518
}
1619

1720
const StyledSidebar: React.FC<StyledSidebarProps> = ({ title, items }) => {
@@ -22,16 +25,12 @@ const StyledSidebar: React.FC<StyledSidebarProps> = ({ title, items }) => {
2225
return window.location.pathname
2326
}, [])
2427

25-
const ListItem = (item: {
26-
name: string
27-
href: string
28-
icon?: React.ElementType
29-
current: boolean
30-
}) => {
28+
const ListItem = (item: SidebarItem) => {
3129
return (
3230
<li key={item.name}>
3331
<a
3432
href={item.href}
33+
target={item.target}
3534
className={classNames(
3635
item.current
3736
? 'bg-desert-green text-white'

admin/inertia/layouts/SettingsLayout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ import {
44
FolderIcon,
55
MagnifyingGlassIcon,
66
} from '@heroicons/react/24/outline'
7-
import { IconGavel } from '@tabler/icons-react'
7+
import { IconDashboard, IconGavel } from '@tabler/icons-react'
88
import StyledSidebar from '~/components/StyledSidebar'
9+
import { getServiceLink } from '~/lib/navigation'
910

1011
const navigation = [
1112
{ name: 'Apps', href: '/settings/apps', icon: CommandLineIcon, current: false },
1213
{ name: 'Legal Notices', href: '/settings/legal', icon: IconGavel, current: false },
14+
{ name: 'Service Logs & Metrics', href: getServiceLink('9999'), icon: IconDashboard, current: false, target: '_blank' },
1315
{ name: 'ZIM Manager', href: '/settings/zim', icon: FolderIcon, current: false },
1416
{
1517
name: 'Zim Remote Explorer',

install/management_compose.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ services:
3434
interval: 30s
3535
timeout: 10s
3636
retries: 3
37+
dozzle:
38+
image: amir20/dozzle:latest
39+
container_name: nomad_dozzle
40+
restart: unless-stopped
41+
ports:
42+
- "9999:8080"
43+
volumes:
44+
- /var/run/docker.sock:/var/run/docker.sock # Allows Dozzle to read logs from the Host's Docker daemon
45+
environment:
46+
- DOZZLE_ENABLE_ACTIONS=true # Enables the action buttons (restart, stop, etc.)
47+
- DOZZLE_ENABLE_SHELL=true # Enables web-based shell access
3748
mysql:
3849
image: mysql:8.0
3950
container_name: nomad_mysql

0 commit comments

Comments
 (0)