A production-ready WordPress template designed for deployment on Quant Cloud. This template uses a secure Apache+PHP base image with multi-stage builds to incorporate WordPress functionality while maintaining security and compatibility.
- WordPress Latest: Uses secure Apache+PHP base with WordPress functionality from official images
- Standard Configuration: Uses WordPress's built-in
wp-config-docker.phpwith environment variable mapping - Quant Cloud Integration: Maps Quant Cloud's
DB_*variables to WordPress standards - Production Ready: Includes health checks, proper file permissions, and security considerations
- WP-CLI Included: WordPress CLI tool pre-installed and configured
- Privileged Port Binding: Apache runs as root for port 80, workers run as www-data for security
- 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 WordPress 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-wordpress:latest) will automatically be provided and used by default - Deploy: Save the application - your WordPress site will be live in minutes!
What you get:
- β Latest WordPress 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 plugins, 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-wordpress-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
masterbranch β 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)
- 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. - Start services:
docker compose up -d
- Access WordPress at http://localhost and run through installation
- Add Standard Plugins and Themes
docker compose exec wordpress wp plugin install quant --activate --allow-root docker compose exec wordpress wp theme install twentytwentyfive --activate --allow-root
- Clone your repo (or this template)
- Install DDEV: https://ddev.readthedocs.io/en/stable/users/install/
- Start DDEV:
ddev start
- Access WordPress at the provided DDEV URL and run through installation
- Add Standard Plugins and Themes
ddev wp plugin install akismet quant --activate ddev wp theme install twentytwentyfive --activate
- Use DDEV Tools
DDEV provides additional developer tools like Xdebug, WP-CLI integration, and automatic WordPress setup. 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 | Enabled by default | Production optimized |
| Access | localhost | Custom domains + CDN |
These are automatically provided by Quant Cloud:
DB_HOST- Database hostDB_DATABASE- Database nameDB_USERNAME- Database usernameDB_PASSWORD- Database password
WORDPRESS_TABLE_PREFIX- Table prefix (default:wp_)WORDPRESS_DEBUG- Enable debug mode (default:false)WP_CONFIG_EXTRA- Additional PHP configuration
Example:
export WP_CONFIG_EXTRA="define('WP_MEMORY_LIMIT', '256M'); define('UPLOAD_MAX_FILESIZE', '64M');"This template includes WP-CLI (WordPress Command Line Interface) pre-installed and configured.
Docker Compose
docker compose exec wordpress wp --info --allow-root
docker compose exec wordpress wp core version --allow-root
docker compose exec wordpress wp plugin list --allow-rootDDEV
ddev wp --info
ddev wp core version
ddev wp plugin listwp --info --allow-root
wp core version --allow-root
wp plugin list --allow-root
wp plugin install akismet quant --activate --allow-root
wp theme install twentytwentyfive --activate --allow-rootWP-CLI automatically inherits the environment variables and database configuration, so it works seamlessly with both local and production environments.
-
Error Establishing a Database Connection
- You might get this error when going to
localhost - Docker Compose might not be ready, so reload page after a few seconds
- If the error persists, see the next item
- You might get this error when going to
-
Database Connection Failed
- Check
DB_HOST,DB_USERNAME,DB_PASSWORDvalues - Verify database service is running (Quant Cloud manages this)
- Check network connectivity
- Check
-
Environment Variables Not Working
- Verify variable names match Quant Cloud standards (
DB_*) - Check container logs for environment mapping output
- Ensure variables are set in deployment environment
- Verify variable names match Quant Cloud standards (
-
Health Check Failures
- Check WordPress is fully started (60s start period)
- Verify Apache is running
- Check resource limits
-
Port Conflicts
- For docker compose, you may see
ports are not availableerrors - 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 - If using DDEV after docker compose, you will need to turn off the app with the same port or run
docker compose stop
- For docker compose, you may see
-
Restarting Local
Docker Compose
docker compose down -v
docker compose up -d
`**DDEV**
```bash
ddev restart
`
or
```bash
ddev delete wordpress-template
ddev start
`
### Logs
View container logs:
**Docker Compose**
```bash
docker compose logs -f wordpressDDEV
ddev logs -fEnable debug mode:
export WORDPRESS_DEBUG=true
export WORDPRESS_DEBUG_LOG=true- Fork the repository
- Create a feature branch
- Make your changes
- Test with both local development and Quant Cloud deployment
- Submit a pull request
Please email security@quantcdn.io with details. Do not open a public issue for security vulnerabilities.
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