A production-ready Drupal template designed for deployment on Quant Cloud. This template uses a standard Drupal installation with intelligent environment variable mapping to support Quant Cloud's database configuration.
- Drupal Latest: Based on PHP 8.4 with all required extensions
- Composer Managed: Modern Drupal development with dependency management
- Quant Cloud Integration: Maps Quant Cloud's
DB_*variables to Drupal standards - Production Ready: Includes proper configuration, security settings, and performance optimizations
- Drush Included: Drupal CLI tool pre-installed and configured
- Code Standards: PHP CodeSniffer with Drupal coding standards included
- CI/CD Integration: GitHub Actions workflow for automated building and deployment
- Multi-Registry Support: Pushes to both GitHub Container Registry and Quant Cloud Registry
- Database Ready: Works with Quant Cloud's managed database service
This template provides two deployment options depending on your needs:
Use our pre-built image - Perfect for most users who want Drupal running quickly without customization.
- Import Template: In Quant Dashboard, create a new application and import this
docker-compose.ymldirectly - Image Source: The "Public Registry" image (
ghcr.io/quantcdn-templates/app-drupal:latest) will automatically be provided and used by default - Deploy: Save the application - your Drupal site will be live in minutes!
What you get:
- ✅ Latest Drupal version
- ✅ Automatic updates via our maintained image
- ✅ Zero configuration required
- ✅ Production-ready setup
- ✅ Works with Quant Cloud's managed database
Fork and customize - For users who need custom modules, themes, or configuration.
- Click "Use this template" on GitHub, or fork this repository
- Clone your new repository locally
Add these secrets to your GitHub repository settings:
QUANT_API_KEY- Your Quant Cloud API keyQUANT_ORGANIZATION- Your organization slug (e.g., "my-company")QUANT_APPLICATION- Your application name (e.g., "my-drupal-site")
Since you'll be using your own registry, delete the public build file:
rm .github/workflows/ci.yml- In Quant Cloud, create a new application
- Import your
docker-compose.yml - Select "Internal Registry" when prompted
- This will use your custom built image from the Quant Cloud private registry
- Push to
master/mainbranch → Production deployment - Push to
developbranch → Staging deployment - Create tags → Tagged releases
What you get:
- ✅ Full customization control
- ✅ Your own Docker registry
- ✅ Automated builds on git push
- ✅ Staging and production environments
- ✅ Version tagging support
For both deployment options, you can develop locally using either Docker Compose or DDEV:
- Clone your repo (or this template)
- Install dependencies:
cd src && composer install && cd ..
- Use overrides (required for local development):
ls docker-compose.override.yml
Note: This override enables testing of entrypoint scripts (like
00-set-document-root.sh) that normally run via Quant Cloud's platform wrapper. Required for proper local development environment. It also mounts your localsrc/directory for live code changes and disables opcache for faster development. - Start services:
docker compose up -d
- Access Drupal at http://localhost and run through installation
- Clone your repo (or this template)
- Install DDEV: https://ddev.readthedocs.io/en/stable/users/install/
- Install dependencies:
ddev composer install
- Check status:
ddev status
- Access Drupal at the provided DDEV URL and run through installation
- Use DDEV Tools
DDEV provides additional developer tools like Xdebug, Drush integration, Redis caching, and matches production configuration exactly. See
.ddev/README.mdfor details.
Local vs Quant Cloud:
| Feature | Local Development | Quant Cloud |
|---|---|---|
| Database | MySQL container | Managed RDS |
| Environment | docker-compose.override.yml |
Platform variables |
| Storage | Local volumes | EFS persistent storage |
| Scaling | Single container | Auto-scaling |
| Debug | Available via settings | Production optimized |
| Redis Cache | Optional (via override) | Optional (via env vars) |
| Access | localhost | Custom domains + CDN |
These are automatically provided by Quant Cloud:
DB_HOST- Database hostDB_PORT- Database portDB_DATABASE- Database nameDB_USERNAME- Database usernameDB_PASSWORD- Database password
DB_PREFIX- Table prefix (default: none)DRUPAL_DEBUG- Enable debug mode (default:false)REDIS_ENABLED- Enable Redis caching (set to"true"to enable)REDIS_HOST- Redis server host (default:redis)
The template automatically falls back to legacy MARIADB_* variables for backward compatibility.
Redis can significantly improve Drupal's performance by providing fast caching. Redis is optional and disabled by default.
To enable Redis:
- Local Development: Uncomment the Redis section in
docker-compose.override.yml - Production: Set
REDIS_ENABLED=truein your Quant Cloud environment variables - Install Redis module:
composer require drupal/redisand enable it
If Redis is not available or fails to connect, Drupal automatically falls back to database caching.
This template includes Drush (Drupal CLI) pre-installed and configured.
Docker Compose
docker compose exec drupal drush status
docker compose exec drupal drush cr # Clear cache
docker compose exec drupal drush updb # Update database
docker compose exec drupal drush cex # Export configuration
docker compose exec drupal drush cim # Import configurationDDEV
ddev drush status
ddev drush cr # Clear cache
ddev drush updb # Update database
ddev drush cex # Export configuration
ddev drush cim # Import configurationdrush status
drush cr
drush pm:enable module_name
drush pm:uninstall module_nameDrush automatically inherits the environment variables and database configuration, so it works seamlessly with both local and production environments.
Docker Compose
docker compose exec drupal vendor/bin/phpcs --standard=./phpcs.xmlDDEV
ddev exec php src/vendor/bin/phpcs --standard=src/phpcs.xmlDocker Compose
docker compose exec drupal vendor/bin/phpcbf --standard=./phpcs.xmlDDEV
ddev exec php src/vendor/bin/phpcbf --standard=src/phpcs.xml-
Add to composer.json in the
srcfolder:cd src composer require drupal/module_name -
Enable the module:
Docker Compose
docker compose exec drupal drush pm:enable module_nameDDEV
ddev drush pm:enable module_name
-
Export configuration:
Docker Compose
docker compose exec drupal drush cexDDEV
ddev drush cex
- Configuration is stored in
src/config/default - Export:
drush cex - Import:
drush cim - Configurations are automatically imported on deployment
-
Database Connection Failed
- Check
DB_HOST,DB_USERNAME,DB_PASSWORDvalues - Verify database service is running (Quant Cloud manages this)
- Check network connectivity
- Check
-
Permission Issues
- Ensure
srcfolder has proper permissions - Check Docker volume mounts
- Ensure
-
Module Installation Issues
- Run
composer installin thesrcdirectory - Clear Drupal cache:
drush cr - Check for PHP memory limits
- Run
-
Port Conflicts
- For docker compose, you may see
port is already allocatederrors - If you are running DDEV, turn it off with
ddev poweroff - If you are running another app, turn it off with
docker compose -p app-name down
- For docker compose, you may see
Docker Compose View container logs:
docker compose logs -f drupalDDEV
ddev logs -fDocker Compose
docker compose exec drupal bashDDEV
ddev sshapp-drupal/
├── Dockerfile # Drupal image with PHP extensions
├── docker-compose.yml # Production/base service definition
├── docker-compose.override.yml.example # Local development overrides template
├── .github/
│ └── workflows/
│ ├── build-deploy.yaml # Quant Cloud ECR deployment
│ ├── ci.yml # GitHub Container Registry (public)
│ └── test.yaml # Code standards testing
├── src/ # Drupal codebase
│ ├── composer.json # PHP dependencies
│ ├── settings.php # Drupal configuration
│ ├── services.yml # Drupal services
│ └── web/ # Web root (auto-generated)
├── quant/
│ └── meta.json # Template metadata
└── README.md # This file
- Fork the repository
- Create a feature branch
- Make your changes
- Test with both local development and Quant Cloud deployment
- See "Code Standards" section above for checking coding standards
- Submit a pull request
This template is released under the MIT License. See LICENSE file for details.
For issues and questions:
- GitHub Issues: Create an issue
- Documentation: Quant Cloud Documentation
- Community: Quant Discord