E5C3 GitHub - peterconsuegra/wp-pete-docker: Production-ready Docker LAMP stack for WordPress, WooCommerce, and Laravel. Pete Panel includes Apache (MPM Event), PHP-FPM, MariaDB, Redis, phpMyAdmin, SSL automation, and one-click WordPress + Laravel integration. Clone, migrate, and scale sites locally or in production with Dev Playgrounds. Β· GitHub
[go: up one dir, main page]

Skip to content

peterconsuegra/wp-pete-docker

Repository files navigation

Pete Panel Docker Environment

WordPress + WooCommerce + Laravel (Docker Stack)

Pete Panel is a developer-first control panel for launching, cloning, migrating, and syncing WordPress and Laravel projects in minutes.

This repository provides the full Docker LAMP stack that powers Pete locally and in production profiles.

πŸ‘‰ Learn more about Pete Dev Playgrounds:
https://deploypete.com/dev-playgrounds/


πŸš€ What This Stack Includes

β€’ Apache (MPM Event + HTTP/2)
β€’ PHP-FPM (WordPress + Laravel runtime)
β€’ MariaDB (tuned for dev & production)
β€’ Redis
β€’ phpMyAdmin (auto-installed)
β€’ Automated first-run Pete installer
β€’ Multiple performance profiles (dev, 16GB, 32GB)


🧠 How the Architecture Works

Browser
β†’ Apache (port 80/443)
β†’ PHP-FPM (port 9000 internal)
β†’ MariaDB / Redis

Volumes persist:

Volume Purpose
wp_data WordPress sites + Pete Panel
db_data Database storage
pma_data phpMyAdmin files
ssl_data Let's Encrypt certificates
apache_logs Apache logs
ssh_data Shared SSH keys

πŸ”— How This Docker Environment Connects to the Pete Panel Laravel Control Panel

This Docker stack is tightly integrated with the Pete Panel Laravel hosting control panel via:

php/pete_install.sh

This script bridges:

β€’ Docker infrastructure (Apache, PHP, DB, Redis)
β€’ The Pete Panel Laravel application
β€’ The DeployPete dashboard (https://dashboard.deploypete.com)


🧩 What Happens on First Boot

When the php container starts, pete_install.sh runs automatically.

1️⃣ Infrastructure Preparation

  • Waits for MariaDB
  • Fixes permissions
  • Prepares /var/www/html

2️⃣ Clones the Laravel Control Panel

It clones:

https://github.com/peterconsuegra/pete-panel.git

Then:

  • Checks out the latest Git tag
  • Creates a fresh .env
  • Injects Docker-specific environment values

Key injected values:


πŸ—„ Database & Laravel Bootstrapping

The script:

β€’ Creates database + user
β€’ Creates options table
β€’ Runs Laravel migrations
β€’ Generates app key
β€’ Caches config and routes

This prepares the control panel to manage:

  • WordPress sites
  • Apache vhosts
  • SSL certificates
  • Exports
  • Logs
  • Backups

βš™οΈ Docker β†’ Laravel Communication

πŸ”„ Apache Internal Reload

APACHE_RELOAD_URL=http://apache/internal-reload

Used when:

  • Creating vhosts
  • Enabling sites
  • Updating Apache configs
  • Requesting certificate generation

Authenticated via:

APACHE_RELOAD_SECRET

πŸ” Security Integration

The installer runs:

Pete/scripts/toggle_security.sh

Development β†’ security relaxed
Production β†’ security configurable


πŸ”‘ SSH Key Automation

The script automatically:

  • Generates SSH keys for www-data
  • Generates SSH keys for root
  • Preloads GitHub/Bitbucket known_hosts

This allows the control panel to:

  • Clone private repositories
  • Deploy Laravel projects
  • Sync WordPress projects

🧠 System Metadata Registration

The installer stores Docker metadata inside the options table:

Examples:

  • os = docker
  • server = apache
  • os_stack = apache_mpm_prefork
  • server_conf = /etc/apache2/sites-available
  • logs_route = /var/www/html/wwwlog

The Laravel control panel uses this to dynamically manage the environment.


πŸ—„ phpMyAdmin Bootstrap

phpMyAdmin is installed automatically into the shared pma_data volume on first boot.


πŸš€ Runtime Mode

After installation:

exec php-fpm -F

Laravel now manages:

β€’ Site creation
β€’ Apache vhost configs
β€’ Internal reload triggers
β€’ Backups and exports
β€’ WordPress + Laravel integrations


πŸ— Conceptual Architecture

Docker provides:

  • Infrastructure
  • Isolation
  • Performance tuning

Laravel (Pete Panel) provides:

  • Hosting control logic
  • Site lifecycle management
  • Dashboard integration
  • Automation

Together they form:

πŸ‘‰ A portable hosting control panel running entirely inside Docker
πŸ‘‰ A production-ready WordPress + Laravel hybrid stack


For advanced workflows:

πŸ‘‰ https://deploypete.com/dev-playgrounds/


πŸ”– Development & Release Policy

Pete Panel follows a stable-first release workflow to keep production environments predictable and safe.

Branching Strategy

  • master branch always contains the latest stable production-ready version
  • Experimental or in-progress features should never live directly in master
  • Stable releases are validated before being pushed

Release Flow

  1. Develop and test changes
  2. Validate stability locally and/or in staging
  3. Push the stable version to the master branch
  4. Create and push a Git tag for that version

Example:

git checkout master
git pull origin master
git tag v14.9
git push origin v14.9

Why This Matters

The Docker installer (pete_install.sh) automatically checks out the latest Git tag:

latestTag=$(git describe --tags `git rev-list --tags --max-count=1`)
git checkout $latestTag

This ensures:

β€’ The Docker environment always installs a stable tagged release
β€’ Production deployments remain deterministic
β€’ The master branch reflects the most recent stable code
β€’ Tags represent immutable release snapshots


This policy guarantees that Docker environments, production servers, and DeployPete dashboard integrations always run verified stable builds.

About

Production-ready Docker LAMP stack for WordPress, WooCommerce, and Laravel. Pete Panel includes Apache (MPM Event), PHP-FPM, MariaDB, Redis, phpMyAdmin, SSL automation, and one-click WordPress + Laravel integration. Clone, migrate, and scale sites locally or in production with Dev Playgrounds.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

0