Skip to main content
Glama
validate-docker.mjsβ€’3.15 kB
#!/usr/bin/env node /** * Simple Docker Validation for MCP Tailwind Gemini * Quick validation that deployment package works correctly */ import { execSync } from 'child_process'; console.log('🐳 MCP Tailwind Gemini - Docker Deployment Validation'); console.log('=' .repeat(55)); try { // 1. Check image exists console.log('\n1. βœ“ Checking Docker image...'); const imageInfo = execSync('docker images mcp-tailwind-runtime:latest --format "{{.Repository}}:{{.Tag}} ({{.Size}})"', { encoding: 'utf8' }); console.log(` Image: ${imageInfo.trim()}`); // 2. Test container run console.log('\n2. βœ“ Testing container deployment...'); // Clean up any existing try { execSync('docker stop mcp-validate 2>/dev/null', { stdio: 'pipe' }); execSync('docker rm mcp-validate 2>/dev/null', { stdio: 'pipe' }); } catch {} // Start container for short test console.log(' Starting container...'); execSync('docker run -d --name mcp-validate mcp-tailwind-runtime:latest', { stdio: 'pipe' }); // Quick stability check await new Promise(resolve => setTimeout(resolve, 3000)); // Check if process is running console.log(' Checking MCP server process...'); const processCheck = execSync('docker exec mcp-validate ps aux | grep node || echo "not found"', { encoding: 'utf8' }); if (processCheck.includes('node dist/index.js')) { console.log(' βœ“ MCP server process running correctly'); } else { console.log(' ⚠ MCP server process check failed'); } // Check logs console.log(' Checking server logs...'); const logs = execSync('docker logs mcp-validate', { encoding: 'utf8' }); if (logs.includes('MCP Tailwind Gemini Server running')) { console.log(' βœ“ MCP server started successfully'); } else { console.log(' ⚠ MCP server startup message not found'); } // Cleanup execSync('docker stop mcp-validate', { stdio: 'pipe' }); execSync('docker rm mcp-validate', { stdio: 'pipe' }); console.log('\n=' .repeat(55)); console.log('πŸŽ‰ DOCKER DEPLOYMENT PACKAGE VALIDATED!'); console.log('=' .repeat(55)); console.log('\nπŸ“¦ Ready for production deployment with:'); console.log(' docker run -d --name mcp-server mcp-tailwind-runtime:latest'); console.log('\nπŸ”§ With environment configuration:'); console.log(' docker run -d \\'); console.log(' -e GEMINI_API_KEY=your_api_key \\'); console.log(' --name mcp-server \\'); console.log(' mcp-tailwind-runtime:latest'); console.log('\nβœ… MCP Tailwind Gemini Docker package is production-ready!'); } catch (error) { console.error(`\n❌ Validation failed: ${error.message}`); // Emergency cleanup try { execSync('docker stop mcp-validate 2>/dev/null', { stdio: 'pipe' }); execSync('docker rm mcp-validate 2>/dev/null', { stdio: 'pipe' }); } catch {} process.exit(1); } // Helper function for async sleep in simple script function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tai-DT/mcp-tailwind-gemini'

If you have feedback or need assistance with the MCP directory API, please join our Discord server