68ec8dd3db02480332fc22f816c7b1a46dd34dc8
All checks were successful
Build and Push Docker Image to Gitea / build-and-push (push) Successful in 1m8s
Features added: - Send Unix signals to processes via interactive modal - Support for common signals (HUP, INT, TERM, KILL, USR1, USR2, QUIT) - Custom signal input for advanced use cases - Safety confirmations for dangerous signals (TERM, KILL, QUIT) - Signal button added to each ProcessCard Implementation details: - Created signal API routes: - /api/supervisor/processes/[name]/signal - Send signal to process - /api/supervisor/groups/[name]/signal - Send signal to group - /api/supervisor/processes/signal-all - Send signal to all processes - Added React Query hooks: - useSignalProcess() - Send signal to single process - useSignalProcessGroup() - Send signal to process group - useSignalAllProcesses() - Send signal to all processes - Created SignalSender modal component: - Grid of common signal buttons with descriptions - Custom signal text input (auto-uppercase) - Two-step confirmation for dangerous signals - Visual warning with AlertTriangle icon - Destructive button variant for confirmed dangerous signals - Backdrop blur overlay ProcessCard enhancements: - Added Zap icon signal button - Modal opens on signal button click - Button disabled when process is stopped - Modal integrates with useSignalProcess hook Common signals with descriptions: - HUP (1): Reload configuration - INT (2): Interrupt - graceful shutdown - QUIT (3): Quit - TERM (15): Terminate - graceful shutdown (dangerous) - KILL (9): Kill - immediate termination (dangerous) - USR1 (10): User-defined signal 1 - USR2 (12): User-defined signal 2 Safety features: - Dangerous signals require confirmation - Warning message explains risks - Button changes to destructive variant - Custom signals also checked for danger - Clear visual feedback during operation Phase 7 complete (3-4 hours estimated)
Supervisor UI
A modern, sophisticated web interface for Supervisor process management built with Next.js 16 and Tailwind CSS 4.
Features
- Real-time Monitoring: Auto-refreshing process status and system information
- Process Control: Start, stop, and restart processes with a single click
- Modern Dashboard: Clean, responsive interface with dark/light mode
- Backend Proxy: Secure API proxy for Supervisor XML-RPC calls
- Docker Ready: Multi-stage Docker build for production deployment
- Type-Safe: Full TypeScript coverage with Zod validation
Tech Stack
- Framework: Next.js 16 (App Router)
- Styling: Tailwind CSS 4 with OKLCH color system
- State Management: TanStack Query (React Query) + Zustand
- API: XML-RPC client for Supervisor
- Type Safety: TypeScript + Zod schemas
- UI Components: Custom components with lucide-react icons
- Notifications: Sonner toast notifications
Prerequisites
- Node.js 20+ with pnpm 10+
- Supervisor instance running with XML-RPC interface enabled
Configuration
Supervisor Setup
Ensure your supervisord.conf has the inet HTTP server enabled:
[inet_http_server]
port = 127.0.0.1:9001
;username = user
;password = pass
Environment Variables
Create a .env.local file:
# Supervisor connection
SUPERVISOR_HOST=localhost
SUPERVISOR_PORT=9001
# Optional: Basic auth (if configured in supervisord.conf)
# SUPERVISOR_USERNAME=user
# SUPERVISOR_PASSWORD=pass
Development
# Install dependencies
pnpm install
# Run development server
pnpm dev
# Open http://localhost:3000
Production Build
# Build for production
pnpm build
# Start production server
pnpm start
Docker Deployment
Using Pre-built Image from Gitea Registry
The easiest way to deploy is using the pre-built image from the Gitea registry:
# Pull the latest image
docker pull dev.pivoine.art/valknar/supervisor-ui:latest
# Run container with custom Supervisor connection
docker run -d \
-p 3000:3000 \
-e SUPERVISOR_HOST=your-supervisor-host \
-e SUPERVISOR_PORT=9001 \
-e SUPERVISOR_USERNAME=user \
-e SUPERVISOR_PASSWORD=pass \
--name supervisor-ui \
dev.pivoine.art/valknar/supervisor-ui:latest
Build and Run Locally
# Build Docker image with custom defaults
docker build -t supervisor-ui \
--build-arg SUPERVISOR_HOST=localhost \
--build-arg SUPERVISOR_PORT=9001 \
.
# Run container (environment variables override build args)
docker run -d \
-p 3000:3000 \
-e SUPERVISOR_HOST=localhost \
-e SUPERVISOR_PORT=9001 \
--name supervisor-ui \
supervisor-ui
Using Docker Compose
Create a .env file for your configuration:
SUPERVISOR_HOST=localhost
SUPERVISOR_PORT=9001
SUPERVISOR_USERNAME=user
SUPERVISOR_PASSWORD=pass
Then use Docker Compose:
# Start with docker-compose
docker-compose up -d
# View logs
docker-compose logs -f supervisor-ui
# Stop
docker-compose down
To use the pre-built image, edit docker-compose.yml and uncomment the registry image line.
Arty Integration
This project supports Arty for container management:
# Start the service
arty up -d supervisor-ui
# View status
arty ps
# View logs
arty logs supervisor-ui
Container Registry
Docker images are automatically built and pushed to the Gitea registry on every commit to main:
- Registry:
dev.pivoine.art - Image:
valknar/supervisor-ui - Tags:
latest- Latest stable build from main branchdevelop- Latest development buildv*.*.*- Semantic version tagsmain-<sha>- Commit-specific builds
Available Tags
# Pull specific versions
docker pull dev.pivoine.art/valknar/supervisor-ui:latest
docker pull dev.pivoine.art/valknar/supervisor-ui:v1.0.0
docker pull dev.pivoine.art/valknar/supervisor-ui:develop
Project Structure
supervisor-ui/
├── app/ # Next.js App Router
│ ├── api/supervisor/ # API routes (Supervisor proxy)
│ ├── processes/ # Process management page
│ ├── logs/ # Logs viewer page
│ ├── config/ # Configuration page
│ └── page.tsx # Dashboard home
├── components/
│ ├── layout/ # Layout components (Navbar)
│ ├── process/ # Process-specific components
│ ├── providers/ # Context providers
│ └── ui/ # Reusable UI components
├── lib/
│ ├── hooks/ # React Query hooks
│ ├── supervisor/ # Supervisor client & types
│ └── utils/ # Utility functions
├── Dockerfile # Multi-stage production build
├── docker-compose.yml # Docker Compose configuration
└── package.json # Dependencies and scripts
API Routes
All Supervisor operations are proxied through Next.js API routes:
GET /api/health- Health check endpointGET /api/supervisor/system- System informationGET /api/supervisor/processes- All processesGET /api/supervisor/processes/[name]- Single process infoPOST /api/supervisor/processes/[name]/start- Start processPOST /api/supervisor/processes/[name]/stop- Stop processPOST /api/supervisor/processes/[name]/restart- Restart processGET /api/supervisor/processes/[name]/logs/stdout- Stdout logsGET /api/supervisor/processes/[name]/logs/stderr- Stderr logs
Features Roadmap
- Real-time process monitoring
- Process control (start/stop/restart)
- System status dashboard
- Dark/light mode theme
- Docker deployment
- Log viewer with real-time tailing
- Configuration management UI
- Process group operations
- Batch process actions
- Charts and metrics visualization
- Search and filtering
- Keyboard shortcuts
- WebSocket support for push updates
Development Scripts
# Development
pnpm dev # Start dev server with hot reload
pnpm dev:turbo # Start dev server with Turbopack
# Build
pnpm build # Production build
pnpm start # Start production server
# Code Quality
pnpm lint # Run ESLint
pnpm lint:fix # Fix ESLint issues
pnpm format # Format with Prettier
pnpm type-check # TypeScript type checking
License
MIT
Credits
Built with inspiration from modern UI patterns and the excellent pastel-ui project configuration.
Description
Languages
TypeScript
95.8%
CSS
3.3%
Dockerfile
0.9%