infrastructure-standards

star 2

Best practices for Docker, CI/CD scripts, and Security Middleware.

michaellperry By michaellperry schedule Updated 1/2/2026

name: infrastructure-standards description: Best practices for Docker, CI/CD scripts, and Security Middleware.

Infrastructure Standards

Role Responsibilities

As a Platform Engineer, you are responsible for:

  • Docker: Containerization of API, Web, and Database services.
  • Scripts: Maintenance of build, test, and deployment scripts in scripts/.
  • Middleware: Security and Multi-tenancy middleware in src/GloboTicket.API/Middleware/.
  • Auth: Configuration of Authentication and Authorization policies.

Docker Best Practices

Docker Compose

  • Always use specific versions for images (no latest).
  • Define health checks for all services.
  • Use .env files for environment-specific configuration.
services:
  api:
    image: globoticket-api:1.0
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
      interval: 30s
      timeout: 10s
      retries: 3

Scripting Standards

Bash & PowerShell

  • Ensure parity between scripts/bash/ and scripts/powershell/.
  • Scripts must be idempotent where possible.
  • Always check for prerequisites (e.g., Docker running) before execution.

Security Middleware

Tenant Resolution

  • Tenant Context is critical security infrastructure.
  • Never bypass TenantResolutionMiddleware in production code.
  • Always log tenant resolution failures as Warnings or Errors.
public async Task InvokeAsync(HttpContext context)
{
    // ... validation logic ...
    if (tenantIdClaim == null)
    {
        _logger.LogWarning("Authenticated user {Username} has no TenantId claim", context.User.Identity.Name);
    }
}
Install via CLI
npx skills add https://github.com/michaellperry/aaad --skill infrastructure-standards
Repository Details
star Stars 2
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator
michaellperry
michaellperry Explore all skills →