VoxaCommunications Test App¶
A simple test application for demonstrating the VoxaCommunications decentralized app deployment system.
Features¶
- Web Interface: Simple HTML dashboard showing app status
- Health Check Endpoint:
/healthfor monitoring - Metrics Endpoint:
/metricsfor performance data - Info Endpoint:
/infofor app metadata - Environment Integration: Displays VoxaCommunications environment variables
Building¶
cd examples/test-app
docker build -t voxa-test-app .
Running Locally¶
docker run -p 8080:8080 \
-e VOXA_APP_ID=test-app-123 \
-e VOXA_INSTANCE_ID=instance-456 \
-e VOXA_NODE_ID=node-789 \
voxa-test-app
Then visit http://localhost:8080
Deploying via VoxaCommunications¶
curl -X POST http://localhost:9999/api/apps/deploy_app \
-H "Content-Type: application/json" \
-d '{
"name": "voxa-test-app",
"version": "1.0.0",
"image": "voxa-test-app:latest",
"replicas": 2,
"resource_requirements": {
"memory": "128m",
"cpu": "0.2"
},
"network_config": {
"ports": {"8080/tcp": {"HostPort": "8080"}}
}
}'
Endpoints¶
/- Main dashboard/health- Health check (JSON)/metrics- Performance metrics (JSON)/info- Application information (JSON)
Environment Variables¶
The app responds to these VoxaCommunications environment variables:
VOXA_APP_ID- Application identifierVOXA_INSTANCE_ID- Instance identifierVOXA_NODE_ID- Node identifierHOST- Bind host (default: 0.0.0.0)PORT- Bind port (default: 8080)