Skip to content

feat: prod env#20

Merged
taygumus merged 16 commits intomainfrom
feat/prod-env
Jan 5, 2026
Merged

feat: prod env#20
taygumus merged 16 commits intomainfrom
feat/prod-env

Conversation

@taygumus
Copy link
Owner

@taygumus taygumus commented Jan 5, 2026

Production hardening: Docker Compose, Certbot, and Makefile improvements

This PR introduces a complete production-ready setup for the stack, with a focus on stability, security, and operational clarity.
All production-specific concerns are isolated from the development configuration.


✨ Highlights

Docker Compose (Production)

  • Added docker-compose.prod.yml with production-only overrides
  • Centralized logging configuration with log rotation (json-file, max-size, max-file)
  • CPU and memory limits defined for all services
  • Security hardening:
    • init: true where appropriate to prevent zombie processes
    • no-new-privileges for WordPress and Nginx
    • tmpfs usage for transient directories
  • MySQL production settings:
    • utf8mb4 character set
    • utf8mb4_unicode_ci collation
  • Clear separation between core services and utility containers

Certbot Integration

  • Added a dedicated Certbot service for Let's Encrypt HTTP-01 validation
  • Persistent volumes for certificates and ACME challenge files
  • Configuration driven entirely by environment variables:
    • SERVER_NAME
    • LETSENCRYPT_EMAIL
    • CERTBOT_RENEW_INTERVAL
  • Certificate issuance, renewal, and dry-run flows are handled via scripts

Makefile Improvements

  • Added production targets for Certbot operations:
    • certbot-first-issue
    • certbot-dry-run
    • certbot-renew
  • Uses docker compose run --rm to keep Certbot executions isolated and idempotent
  • No runtime configuration embedded in the Makefile; all values are sourced from .env

Environment Configuration

  • Updated env.example to document all required production variables
  • Added sensible defaults where applicable (e.g. renewal interval)

🧠 Design Principles

  • Strict separation of development and production concerns
  • No long-running utility containers started by default
  • Scripts encapsulate logic; Docker Compose and Makefile focus on orchestration
  • Optimized for single-node production deployments (VPS-friendly)

✅ Scope

This PR focuses exclusively on production configuration and does not modify application-level logic or development workflows.

@taygumus taygumus self-assigned this Jan 5, 2026
@taygumus taygumus added the enhancement New feature or request label Jan 5, 2026
@taygumus taygumus merged commit 91cb7dd into main Jan 5, 2026
4 checks passed
@taygumus taygumus deleted the feat/prod-env branch January 8, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant