From c5d87ccbaaa4ccfa4f8c4b4183be42aa792bc980 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 26 Jul 2025 09:06:08 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A=20Update=20documentation=20with=20?= =?UTF-8?q?deployment=20and=20health=20check=20information?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add comprehensive Railway.app deployment section to CLAUDE.md - Document health check endpoint (/health/) for monitoring - Include production commands and health monitoring examples - Update URL structure to include /health/ and /contact/ endpoints - Reference new deployment guides (RAILWAY_DEPLOYMENT_GUIDE.md, etc.) - Add production features documentation (PostgreSQL, Redis, SSL) Documentation now includes: • Complete deployment workflow with Railway.app • Health monitoring and production commands • Environment configuration and verification steps • Updated URL structure with new endpoints 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- CLAUDE.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index d3b8c95..8443c65 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -53,6 +53,9 @@ python tests/test_five_whys_webhook.py # Test homepage functionality python tests/test_homepage.py + +# Test health check endpoint +curl http://localhost:8000/health/ ``` ### Custom Management Commands @@ -129,6 +132,8 @@ Each agent is a separate Django app following this structure: ``` / # Homepage (core app) /pricing/ # Pricing page (core app) +/health/ # Health check endpoint for monitoring (core app) +/contact/ # Contact form submission (core app) /marketplace/ # Agent marketplace (agent_base app) /agents// # Agent detail redirect (agent_base app) /auth/ # Authentication (login, register, profile) @@ -299,12 +304,51 @@ This ensures Claude will: ✅ Follow established patterns from working agents ✅ Maintain consistency across the platform -### Deployment +### Deployment & Production -- **Railway.app** integration via `railway.json` -- Production settings in `netcop_hub/production_settings.py` +**Railway.app (Recommended)** +- **Configuration**: `railway.json` with optimized Gunicorn settings +- **Deployment Guide**: See `RAILWAY_DEPLOYMENT_GUIDE.md` for step-by-step instructions +- **Environment Variables**: Use `RAILWAY_ENV_TEMPLATE.md` for production configuration +- **Health Check**: `/health/` endpoint for monitoring and load balancers +- **Verification**: Follow `POST_DEPLOYMENT_CHECKLIST.md` after deployment + +**Production Features:** +- PostgreSQL database with connection pooling +- Redis caching for sessions and performance +- SSL certificates and HTTPS enforcement - Static files served via WhiteNoise - Database migrations run automatically on deployment +- Rate limiting and security headers +- Custom 404/500 error pages + +**Health Monitoring:** +```bash +# Check application health +curl https://your-domain.railway.app/health/ + +# Expected response: +{ + "status": "healthy", + "checks": { + "database": {"status": "healthy", "response_time_ms": 2.5}, + "agents": {"status": "healthy", "active_count": 7} + } +} +``` + +**Production Commands:** +```bash +# Test deployment readiness +DEBUG=False python manage.py check --deploy + +# Collect static files for production +python manage.py collectstatic --noinput + +# Test health check locally +python manage.py runserver +curl http://localhost:8000/health/ +``` ### File Upload Handling