bknd logo

Templates

Handy Docker compose templates

I've put together a collection of Docker Compose templates that I use for various projects. These are production-ready configurations that I've tested and refined over time.

Repository

You can find all the templates here: https://git.aio.sh/tuff/docker

The repository includes templates for web applications, databases, development tools, monitoring, and more. Most templates are pretty straightforward.

Quick Start

Clone the Repository

git clone https://git.aio.sh/tuff/docker.git
cd docker

Using a Template

  1. Navigate to the desired service directory:

    cd templates/nginx
  2. Copy the template to your project:

    cp docker-compose.yml /path/to/your/project/
  3. Copy the env file to your project (if any!):

    cp .env.example /path/to/your/project/.env
  4. Customize the configuration:

    nano docker-compose.yml
  5. Start the services:

    docker compose up -d

Template Structure

Each template follows a consistent structure:

templates/
├── service-name/
│   ├── docker-compose.yml      # Main compose file
│   ├── .env.example           # Environment variables template
│   ├── README.md              # Service-specific documentation
│   └── config/                # Configuration files (if needed)
│       └── ...