Skip to content

nord-winter/dockerpress

Repository files navigation

πŸš€ DockerPress

DockerPress Logo

Production-ready WordPress with Bedrock, Sage, and complete DevOps stack

License: MIT Docker WordPress MariaDB

English | Русский


πŸ“‘ Table of Contents


✨ Features

🎯 Core Stack

  • Bedrock WordPress - Modern structure
  • Sage 10 - Advanced theme starter
  • MariaDB 11.2 - High performance DB
  • KeyDB - Multi-threaded Redis
  • Nginx - Optimized reverse proxy

πŸ› οΈ Management

  • Portainer - Docker web UI
  • Adminer - Database manager
  • WP-CLI - Command line tools
  • Mailhog - Email testing
  • Node.js - Theme development

πŸ“Š Monitoring & Logs

  • Grafana - Visualization
  • Prometheus - Metrics collection
  • Loki - Log aggregation
  • Promtail - Log collector
  • cAdvisor - Container metrics

πŸ”’ Security & Backup

  • Fail2Ban - Brute-force protection
  • Rate limiting - Request throttling
  • Security headers - XSS, CSRF protection
  • Auto backups - Daily DB & files backup
  • SSL ready - HTTPS support

πŸš€ Quick Start

Prerequisites

  • Docker Engine 20.10+
  • Docker Compose 2.0+
  • 2GB RAM minimum (4GB+ recommended)
  • 10GB free disk space

Installation

# Clone the repository
git clone https://github.com/yourusername/dockerpress.git
cd dockerpress

# Run quick start script
chmod +x start.sh
./start.sh

# Or manually
cp .env.example .env
# Edit .env with your settings
docker-compose up -d

Access Your Services

Service URL Default Credentials
🌐 WordPress http://localhost:8080 Setup on first run
πŸ—„οΈ Adminer http://localhost:8081 Server: mariadb
🐳 Portainer http://localhost:9000 Create on first run
πŸ“Š Grafana http://localhost:3000 admin / admin
πŸ“§ Mailhog http://localhost:8025 -
πŸ“ˆ Prometheus http://localhost:9090 -

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         Nginx (Port 80/443)                  β”‚
β”‚                      Reverse Proxy + SSL                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
           β”‚                            β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   WordPress         β”‚      β”‚    Monitoring     β”‚
β”‚   (Bedrock + Sage)  β”‚      β”‚                   β”‚
β”‚                     β”‚      β”‚  - Grafana        β”‚
β”‚  - PHP-FPM          β”‚      β”‚  - Prometheus     β”‚
β”‚  - Composer         β”‚      β”‚  - Loki           β”‚
β”‚  - WP-CLI           β”‚      β”‚  - Promtail       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”
    β”‚             β”‚
β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”   β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”
β”‚MariaDB β”‚   β”‚  KeyDB  β”‚
β”‚  11.2  β”‚   β”‚ (Redis) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“¦ Services

🌐 WordPress (Bedrock)
  • Modern WordPress boilerplate
  • Composer for dependency management
  • Environment-based configuration
  • Enhanced folder structure
  • Better security defaults
🎨 Sage Theme
  • Laravel Blade templating
  • Webpack/Vite asset bundling
  • Tailwind CSS support
  • Hot module replacement
  • Modern JavaScript (ES6+)
πŸ—„οΈ MariaDB
  • High-performance MySQL fork
  • Optimized configuration
  • Automatic backups
  • Slow query logging
  • UTF8MB4 support
⚑ KeyDB
  • Multi-threaded Redis alternative
  • 5x faster than Redis
  • 100% Redis compatible
  • Active replication
  • FLASH storage support
πŸ“Š Grafana Stack
  • Beautiful dashboards
  • Real-time metrics
  • Log exploration (Loki)
  • Alerting system
  • Data source provisioning
πŸ”’ Fail2Ban
  • Automatic IP banning
  • Protection against brute-force
  • Custom jail rules
  • WordPress-specific filters
  • Email notifications

πŸ“š Documentation

Useful Commands

# Start services
docker-compose up -d

# View logs
docker-compose logs -f

# Check system status
./check.sh

# Access WP-CLI
docker-compose exec wpcli wp --info

# Manual backup
docker-compose exec backup /backup.sh

# Stop services
docker-compose down

🎯 Use Cases

πŸš€ Development

  • Hot reload for theme development
  • Email testing with Mailhog
  • Debug logs in Grafana
  • Quick database access

🏒 Production

  • Automated backups
  • Security hardening
  • Performance monitoring
  • Log aggregation
  • Fail2Ban protection

πŸ“Š Enterprise

  • Complete monitoring stack
  • Metrics and alerting
  • Centralized logging
  • Container orchestration
  • Scalability ready

πŸ”§ Configuration

Environment Variables

Key variables in .env:

# Database
DB_PASSWORD=your_secure_password
MYSQL_ROOT_PASSWORD=your_root_password

# WordPress
WP_ENV=production
WP_HOME=https://yourdomain.com
WP_DEBUG=false

# Security Keys
AUTH_KEY=generate-at-roots.io/salts
# ... more keys

# Monitoring
GRAFANA_PASSWORD=admin

SSL Setup

# Generate self-signed certificate (dev)
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
  -keyout nginx/ssl/key.pem -out nginx/ssl/cert.pem

# For production, use Let's Encrypt
# See documentation for Certbot integration

🀝 Contributing

Contributions are welcome! Please read our Contributing Guidelines.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

🌟 Star History

Star History Chart


πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments


πŸ“ž Support


Made with ❀️ for the WordPress Community

GitHub stars GitHub forks

About

Modern and powerful Docker composition for WordPress with Bedrock and Sage DockerPress is a production-ready solution for running WordPress using modern technologies and DevOps best practices.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors