← Back to all products
$29
Docker Compose Templates
50+ production Docker Compose configurations for common stacks: LAMP, MEAN, Django, Rails, microservices.
JSONMarkdownShellYAMLConfigDockerRedisPostgreSQLNginxGrafana
📄 Product Preview
Try the interactive reader and demo tools below, or get the full product with all content unlocked.
📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample📁 File Structure 12 files
docker-compose-templates/
├── LICENSE
├── README.md
├── guides/
│ └── docker-compose-patterns.md
├── scripts/
│ └── stack-manager.sh
├── shared/
│ ├── .env.example
│ └── traefik/
│ └── docker-compose.yml
└── stacks/
├── ci-runner/
│ └── docker-compose.yml
├── database/
│ └── docker-compose.yml
├── elk/
│ └── docker-compose.yml
├── monitoring/
│ └── docker-compose.yml
├── web-app/
│ └── docker-compose.yml
└── wordpress/
└── docker-compose.yml
📖 Documentation Preview README excerpt
Docker Compose Templates
Production-ready Docker Compose stacks for web apps, monitoring, logging, databases, and CI runners.
Drop-in Compose files for the most common self-hosted infrastructure. Each stack is tested, commented, and ready to deploy with a single docker compose up -d. Includes a Traefik reverse proxy with automatic TLS and a stack manager script.
What You Get
- 7 ready-to-deploy stacks — Web app, monitoring, ELK, CI runner, database, WordPress, Traefik
- Shared reverse proxy — Traefik with automatic Let's Encrypt certificates
- Stack manager script — Deploy, stop, restart, and check status of any stack
- Environment template — Documented
.env.examplewith all configurable variables - Patterns guide — Networking, volumes, health checks, secrets, and multi-service patterns
File Tree
docker-compose-templates/
├── README.md
├── manifest.json
├── LICENSE
├── stacks/
│ ├── web-app/docker-compose.yml # Nginx + Node.js + PostgreSQL + Redis
│ ├── monitoring/docker-compose.yml # Prometheus + Grafana + AlertManager
│ ├── elk/docker-compose.yml # Elasticsearch + Logstash + Kibana
│ ├── ci-runner/docker-compose.yml # GitLab Runner with Docker executor
│ ├── database/docker-compose.yml # PostgreSQL + pgAdmin + pgBouncer
│ └── wordpress/docker-compose.yml # WordPress + MariaDB + Redis + Nginx
├── shared/
│ ├── traefik/docker-compose.yml # Traefik v3 reverse proxy + Let's Encrypt
│ └── .env.example # Template environment variables
├── scripts/
│ └── stack-manager.sh # Deploy/stop/restart any stack
└── guides/
└── docker-compose-patterns.md # Networking, volumes, health checks
Getting Started
1. Configure Environment
cp shared/.env.example .env
# Edit .env with your domain, email, passwords, etc.
2. Start the Reverse Proxy
docker compose -f shared/traefik/docker-compose.yml up -d
3. Deploy a Stack
# Using the stack manager
./scripts/stack-manager.sh deploy web-app
*... continues with setup instructions, usage examples, and more.*
📄 Code Sample .sh preview
scripts/stack-manager.sh#!/usr/bin/env bash
# =============================================================================
# Stack Manager — deploy, stop, restart, and inspect Docker Compose stacks
# =============================================================================
#
# Usage:
# ./scripts/stack-manager.sh <command> [stack]
#
# Commands:
# deploy <stack|all> Start a stack (or every stack) in detached mode
# stop <stack|all> Stop a running stack
# restart <stack> Restart a single stack
# status Show running containers across all stacks
# logs <stack> Tail logs for a stack (Ctrl-C to quit)
# pull <stack|all> Pull latest images without restarting
# ps Alias for status
#
# Examples:
# ./scripts/stack-manager.sh deploy web-app
# ./scripts/stack-manager.sh deploy all
# ./scripts/stack-manager.sh status
# ./scripts/stack-manager.sh logs monitoring
# =============================================================================
set -euo pipefail
# ---------------------------------------------------------------------------
# Paths — resolve relative to this script so it works from any working dir
# ---------------------------------------------------------------------------
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
STACKS_DIR="$PROJECT_ROOT/stacks"
SHARED_DIR="$PROJECT_ROOT/shared"
# All available stack names (subdirectories of stacks/)
AVAILABLE_STACKS=()
for dir in "$STACKS_DIR"/*/; do
[ -d "$dir" ] && AVAILABLE_STACKS+=("$(basename "$dir")")
done