Overview
This template provides a production‑ready Drupal instance as a Monk runnable. You can:- Run it directly to get a managed Drupal CMS with database
- Inherit it in your own runnable to seamlessly add a powerful content management system to your stack
What this template manages
- Drupal 9/10 container (PHP-FPM with Apache)
- MySQL database container
- Network services on ports 80/443
- Persistent volumes for Drupal files, modules, themes, and database
- Optional initialization of database credentials
Quick start (run directly)
- Load templates
- Run Drupal with database
- Customize credentials (recommended via inheritance)
variables. Secrets added with monk secrets add will not affect this runnable unless you inherit it and reference those secrets.
- Preferred: inherit and replace variables with
secret("...")as shown below. - Alternative: fork/clone and edit the
variablesin the manifest, thenmonk load MANIFESTand run.
http://localhost and complete the installation wizard.
Configuration
Key variables you can customize in this template:${monk-volume-path}/drupal and ${monk-volume-path}/mysql on the host.
Use by inheritance (recommended for projects)
Inherit the Drupal runnable in your application and declare connections. Example:Ports and connectivity
- HTTP service:
drupalon TCP port80 - HTTPS service: TCP port
443(if configured with SSL) - Admin interface:
http://\<host>/admin(after installation) - From other runnables in the same process group, use
connection-hostname("\<connection-name>")to resolve the Drupal host.
Persistence and configuration
- Drupal files:
${monk-volume-path}/drupal/sites:/var/www/html/sites - Modules:
${monk-volume-path}/drupal/modules:/var/www/html/modules - Themes:
${monk-volume-path}/drupal/themes:/var/www/html/themes - Database data:
${monk-volume-path}/mysql:/var/lib/mysql - You can add custom modules and themes by placing them in the respective volume paths.
Features
- Powerful Content Management: Rich content editing with flexible content types
- Extensible: 40,000+ modules and themes
- Multilingual: Built-in translation system
- Access Control: Robust user roles and permissions
- API-First: RESTful web services, JSON:API, GraphQL
- Scalable: From small sites to enterprise platforms
- Security: Regular security updates, proven track record
- SEO-Friendly: Built-in SEO features and best practices
Initial Setup
After launching:- Navigate to
http://localhost - Select installation language
- Choose installation profile (Standard, Minimal, or Demo)
- Enter database credentials:
- Database:
drupal - Username:
drupal - Password:
\<your-mysql-user-password> - Host:
mysql(or database service name)
- Database:
- Configure site (name, email, admin account)
- Complete installation
Popular Modules
Extend Drupal with modules:- Views: Create custom content lists and pages
- Panels: Advanced page layouts
- Webform: Build complex forms
- Pathauto: Automatic URL aliases
- Token: Dynamic content tokens
- IMCE: File browser and uploader
- Admin Toolbar: Enhanced admin menu
Content Types
Drupal’s content types allow you to:- Define custom fields (text, images, references, etc.)
- Create structured content (articles, products, events)
- Build complex relationships between content
- Implement custom workflows
Use cases
Drupal excels at:- Corporate and government websites
- E-commerce platforms (with Drupal Commerce)
- Media and publishing sites
- Community and social platforms
- Educational portals
- Multi-site platforms
- Headless/API-driven applications
Related templates
- Combine with databases (PostgreSQL, MySQL) for content storage
- Use with CDN for static asset delivery
- Integrate with object storage (S3, Minio) for media files
Troubleshooting
- If you changed
mysql-passwordormysql-user-passwordbut the containers have existing data, authentication may fail. Either reset the data volumes or update the passwords inside the database to match. - Ensure the host volumes are writable by the container user.
- For installation issues, verify database connection settings match the environment variables.
- For file permission errors, check volume permissions on the host.
- Check container logs:
- Access admin interface at
http://localhost/admin(after installation) - Check Drupal logs: Reports → Recent log messages
- Run Drupal console commands (requires Drush):
- For performance issues, enable caching and CSS/JS aggregation in Drupal settings
- Use Drush for CLI management and maintenance tasks