@docker-digital/dockernet-agent
v0.1.5
Published
DockSplit Agent - NestJS Agent Application
Maintainers
Readme
DockSplit Agent
NestJS-based agent application for DockSplit system.
Installation
Global Installation (Recommended)
npm install -g @docker-digital/dockernet-agentSau khi cài đặt, bạn có thể chạy dockernet-agent từ bất kỳ đâu:
# Set API key
dockernet-agent --apiKey YOUR_API_KEY
# Show config
dockernet-agent --config
# List profiles
dockernet-agent --profiles
# Run as daemon
dockernet-agent --run
# Stop daemon
dockernet-agent --stopLocal Installation
npm installUsage
CLI Commands (After Global Installation)
# Set API key
dockernet-agent --apiKey YOUR_API_KEY
# Show config
dockernet-agent --config
# List profiles
dockernet-agent --profiles
# Show version
dockernet-agent --version
# Run as daemon
dockernet-agent --run
# Stop daemon
dockernet-agent --stop
# Restart daemon
dockernet-agent --restartLocal Development Commands
# Set API key
npm run agent -- --apiKey YOUR_API_KEY
# Show config
npm run agent -- --config
# List profiles
npm run agent -- --profiles
# Run as daemon
npm run agent -- --runDevelopment
# Run in development mode
npm run dev
# Build
npm run build
# Run production build
npm run start:prodArchitecture
The agent is structured following NestJS best practices:
Services: Core business logic
ApiService: HTTP client for backend APIConfigService: Configuration managementDockerService: Docker operationsEventService: Event polling and processingLogService: Container log streamingMachineService: Machine registration and statusProfileService: Profile management (start/stop)VolumeSyncService: Volume synchronization
Commands: CLI interface
AgentCommand: Main command handler
Features
- Machine registration with server
- Event polling and processing
- Profile start/stop operations
- Container log streaming
- Service status updates
- Volume synchronization
- Private registry authentication
