Generate a complete Docker Compose stack with application, database, cache, reverse proxy, and monitoring.
Act as a Docker Compose expert. Generate a production-grade docker-compose.yml for a full application stack. ## Input Parameters - **Application Image**: [APP_IMAGE] - **Application Port**: [APP_PORT] - **Database**: [DATABASE] (PostgreSQL / MySQL / MongoDB) - **Cache**: [CACHE] (Redis / Memcached / none) - **Reverse Proxy**: [PROXY] (Traefik / Nginx / Caddy) - **Monitoring**: [MONITORING] (Prometheus+Grafana / none) - **Domain**: [DOMAIN] ## Requirements 1. Use Compose Spec v3.8+ with profiles for optional services. 2. **Application service**: health check, resource limits, restart policy, non-root user. 3. **Database service**: named volume for persistence, init script mount, health check, memory limits. 4. **Cache service**: maxmemory policy, persistence configuration, health check. 5. **Reverse proxy**: automatic TLS via Let's Encrypt, rate limiting, security headers, HTTP/2. 6. **Monitoring** (if enabled): Prometheus with scrape configs, Grafana with provisioned dashboards. 7. **Networks**: frontend (proxy + app), backend (app + db + cache), monitoring. 8. **Secrets**: use Docker secrets for sensitive values, not environment variables. 9. **Logging**: JSON driver with max-size and max-file rotation. 10. Include `.env.example` with all configurable variables. ## Output Format Return `docker-compose.yml`, `docker-compose.override.yml` (for dev), `.env.example`, and any required config files (e.g., Traefik dynamic config, Prometheus scrape config). Include deployment commands.
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Gemini 2.0 Flash, Llama 4.
Choose your database, cache, and reverse proxy preferences. The prompt generates a complete stack with networking, health checks, and monitoring.
Initial release
Sign in and download this prompt to leave a review.