Skip to content

ithan/directus-quickstarter

Repository files navigation

Directus Starter Project

A comprehensive Docker-based starter kit for Directus that includes:

  • PostgreSQL database with optimized configuration
  • KeyDB (Redis-compatible) caching
  • MinIO S3-compatible object storage
  • PgPool for connection pooling
  • MailHog for email testing
  • Complete Docker Compose setup with health checks

Features

  • Production-ready architecture: Multi-container setup with best practices
  • Performance optimized: Pre-configured database indexes, query caching
  • Developer friendly: Includes tools for monitoring and debugging
  • Easy deployment: Simple setup with minimal configuration required
  • Email testing: Built-in MailHog for intercepting and testing emails
  • S3 storage: MinIO provides S3-compatible storage for asset management

Prerequisites

  • Docker and Docker Compose
  • Node.js 20+ (for development)

Quick Start

  1. Clone this repository
  2. Create your .env file: cp .env.example .env
  3. Run the startup script:
    # On Linux/macOS
    ./startup.sh
    
    
  4. Access Directus at http://localhost:8055 with:
    • Email: admin@example.com
    • Password: password

Included Services

  • Directus: Main CMS application (port 8055)
  • PostgreSQL: Database with optimized configuration (port 5432)
  • PgPool: Connection pooling and query caching (port 5433)
  • KeyDB: Redis-compatible cache for performance (port 6379)
  • MinIO: S3-compatible object storage (ports 9000, 9001)
  • MailHog: Email testing tool (ports 1025, 8025)

Useful Commands

# Start all services
docker compose up -d

# View logs
docker compose logs -f

# Stop all services
docker compose down

# Reset everything (removes volumes and data)
./cleanup.sh  

Environment Configuration

The included .env.example file contains detailed documentation for all available configuration options.

Database Optimization

This starter includes database configuration optimized for Directus workloads. See find_optimal_indexes.md for guidance on identifying and creating performance-enhancing indexes.

Extending Directus

Create custom extensions in the extensions directory. They will be automatically mounted into the Directus container.

Production Deployment

For production use:

  1. Generate new secure passwords in the .env file
  2. Consider enabling SSL/TLS for all services
  3. Implement proper backup strategies for Postgres and MinIO
  4. Set up monitoring and alerting

License

This starter kit is available under the MIT License. See the LICENSE file for details.

About

A quickstarter for directus

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published