Production12 recipes

Ready for production environments

mlflowYAMLintermediateVerified
MLflow Tracking Server with PostgreSQL and S3 Artifact Store

Deploy a production MLflow tracking server backed by PostgreSQL for run metadata and S3 for artifacts. Includes docker-compose setup, basic auth proxy and Python client configuration.

nextjsJavaScriptintermediateVerified
Next.js Production next.config.mjs with Security Headers

A production next.config.mjs with security headers, image domain allowlisting, bundle analyser integration, standalone output mode for Docker, and environment variable validation.

fastapiPythonintermediateVerified
FastAPI Production App Factory with Async SQLAlchemy

A production-ready FastAPI application using the app factory pattern, async SQLAlchemy 2.0 with PostgreSQL, Alembic migrations, structured logging, and health-check endpoint.

elasticsearchJSONadvancedVerified
Elasticsearch Product Search Index Mapping

An optimised Elasticsearch index mapping for e-commerce product search: multi-language text fields, keyword facets, numeric ranges, synonym filters and ILM policy for index rollover.

nginxNginxintermediateVerified
Nginx API Rate Limiting with Burst Zones

Protect API endpoints from abuse using Nginx limit_req_zone. Defines separate zones for authenticated vs anonymous users with burst allowances and appropriate 429 error responses.

kafkaPropertiesadvancedVerified
Kafka Broker Configuration for High-Throughput Production

A tuned server.properties for Apache Kafka optimised for high-throughput event streaming: retention policies, replication factors, network thread tuning and JVM heap settings.

redisINIintermediateVerified
Production Redis Configuration with Persistence and Memory Policy

A hardened redis.conf for production use: disabled commands, maxmemory with LRU eviction, combined RDB + AOF persistence, bind to localhost, and requirepass authentication.

postgresqlINIadvancedVerified
PostgreSQL Performance Tuning — postgresql.conf

Tuned postgresql.conf settings for a dedicated 8-core / 32 GB RAM database server. Covers shared buffers, WAL, autovacuum, parallel query and connection settings — with explanations for each knob.

github-actionsYAMLintermediateVerified
GitHub Actions: Build, Push Docker Image and Deploy

A complete CI/CD workflow that builds a Docker image on every push to main, pushes it to GitHub Container Registry (GHCR) and SSH-deploys to a production server using docker compose pull && up.

nginxNginxintermediateVerified
Nginx HTTPS Reverse Proxy with SSL/TLS Hardening

Complete Nginx server block that terminates HTTPS, enforces TLS 1.2+, sets HSTS and security headers, enables gzip compression, and proxies to an upstream application server.

kubernetesYAMLintermediateVerified
Kubernetes Deployment with HPA and Resource Limits

A production Kubernetes Deployment manifest with liveness/readiness probes, resource requests/limits, rolling update strategy and a HorizontalPodAutoscaler to handle traffic spikes.

dockerDockerfileintermediateVerified
Production Multi-Stage Dockerfile for Node.js

A minimal, secure multi-stage Dockerfile for Node.js apps. The build stage installs devDependencies, the production stage copies only the compiled output — keeping the final image under 150 MB.