jmservera/aithena/nginx-reverse-proxy
Claude Code and agent skill by jmservera/aithena
- community
Checking that the SKILL.md file is still in the repository.
nginx reverse proxy patterns for Docker Compose multi-service apps: routing, health checks, startup ordering, SSL overlay
Install
npx vskill@latest install jmservera/aithena/nginx-reverse-proxySKILL.md
The same SKILL.md was published earlier as jmservera/aithena/nginx-reverse-proxy.
Context
nginx is the single entry point for all aithena traffic. It reverse-proxies the React frontend, FastAPI backend, Solr admin, RabbitMQ management, Streamlit admin, and Redis Commander. Getting the configuration right is critical for zero-downtime startup and clean service isolation.
Pattern 1: Single Port Publisher
Rule: Only nginx publishes host ports. All other services use expose: only.
Why: Prevents port collisions (e.g., zoo1 admin-server on 8080 vs solr-search on 8080), simplifies firewall rules, and centralizes TLS termination.
Pattern 2: Health Endpoint
nginx includes a lightweight health endpoint for Docker health checks:
Docker Compose health check:
Pattern 3: Upstream Routing Map
| Path | Upstream | Notes | |
|---|---|---|---|
/ | aithena-ui:5173 | React dev server (Vite) | |
/v1/ | solr-search:8080 | FastAPI search API | |
/admin/solr/ | solr1:8983 | Solr admin UI | |
/rabbitmq/ | rabbitmq:15672 | RabbitMQ management | |
/streamlit/ | admin:8501 | Streamlit admin dashboard | |
/redis/ | redis-commander:8081 | Redis Commander UI | |
/health | local | nginx health check |
Key: Each upstream path must handle trailing slashes and websocket upgrades (for Vite HMR and Streamlit).
Pattern 4: Startup Ordering (Last-to-Start)
nginx depends on all upstream services being healthy. It must start last to avoid 502 errors during cold start.
Rationale: If nginx starts before upstreams are ready, clients see 502 Bad Gateway. The service_healthy condition prevents this.
Pattern 5: SSL as Compose Overlay
SSL/TLS (certbot) is optional. The base compose file runs HTTP-only. SSL is added via overlay:
Why overlay instead of profiles: Docker Compose profiles can disable the certbot service but can't conditionally add volume mounts or port bindings to nginx. The overlay cleanly isolates:
- certbot service definition
- nginx SSL volume mounts (
/etc/letsencrypt,/var/www/certbot) - Port 443 binding
- SSL-specific nginx config snippets
Anti-Patterns
- Don't publish host ports on backend services — route everything through nginx
- Don't start nginx before upstreams are healthy — causes 502 errors
- Don't use `proxy_pass` without trailing slash consistency — causes path rewriting bugs
- Don't put SSL config in the base compose file — use overlay for optional features
- Don't skip `access_log off` on health endpoints — pollutes logs with high-frequency noise
References
src/nginx/— nginx configuration filesdocker-compose.yml— nginx service definition and dependenciesdocker/compose.ssl.yml— SSL overlay with certbot- Skill
docker-health-checks— health check patterns for all services
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.squad/skills/nginx-reverse-proxy/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jmservera/aithena/nginx-reverse-proxy)