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
- 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
- Docker and Docker Compose
- Node.js 20+ (for development)
- Clone this repository
- Create your
.envfile:cp .env.example .env - Run the startup script:
# On Linux/macOS ./startup.sh - Access Directus at http://localhost:8055 with:
- Email:
admin@example.com - Password:
password
- Email:
- 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)
# 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 The included .env.example file contains detailed documentation for all available configuration options.
This starter includes database configuration optimized for Directus workloads. See find_optimal_indexes.md for guidance on identifying and creating performance-enhancing indexes.
Create custom extensions in the extensions directory. They will be automatically mounted into the Directus container.
For production use:
- Generate new secure passwords in the
.envfile - Consider enabling SSL/TLS for all services
- Implement proper backup strategies for Postgres and MinIO
- Set up monitoring and alerting
This starter kit is available under the MIT License. See the LICENSE file for details.