This repository lets you run a full WordPress site (PHP–FPM, MySQL, nginx) in Docker with minimal fuss—just supply an .env file.
- PHP-FPM (configurable via
WP_VERSION&PHP_VERSION) - nginx with custom DNS + template
- MySQL 5.7 with healthcheck
- Automated backups of both files and database
- Custom WordPress CLI container for db dumps
- Single-command install via
scripts/install.sh
- Clone
git clone https://github.com/you/your-repo.git
cd your-repo- Configure
Copy .env.example to .env, then edit to suit:
cp .env.example .env- Install
bash scripts/install.sh- Visit
Your site will be up at:
http://${APP_MAIN_DOMAIN}:${APP_PORT}
- Change WP version: Set
WP_VERSIONin.env(e.g.6.2). - PHP version: Set
PHP_VERSION(e.g.8.1). - Backup schedule: Adjust
BACKUP_CRON_EXPRESSION. - Restart policies: Tweak
RESTART_POLICY.
- wp_data and db_data are persisted on host.
- backups/ is bind-mounted for archives—excluded from git.
- Use Traefik labels (already in compose) for TLS & host routing.
- Swap MySQL for MariaDB by changing the image in
docker-compose.yml.