Skip to content

Deploy WordPress multi sites (PHP–FPM, MySQL, nginx) in Docker with minimal fuss - just supply an `.env` file.

License

Notifications You must be signed in to change notification settings

HouseOfAgile/dockerized-wordpress

Repository files navigation

Dockerized WordPress Stack

This repository lets you run a full WordPress site (PHP–FPM, MySQL, nginx) in Docker with minimal fuss—just supply an .env file.

Features

  • 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

Quick Start

  1. Clone
   git clone https://github.com/you/your-repo.git
   cd your-repo
  1. Configure

Copy .env.example to .env, then edit to suit:

   cp .env.example .env
  1. Install
   bash scripts/install.sh
  1. Visit Your site will be up at: http://${APP_MAIN_DOMAIN}:${APP_PORT}

Customization

  • Change WP version: Set WP_VERSION in .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.

Volumes & Backups

  • wp_data and db_data are persisted on host.
  • backups/ is bind-mounted for archives—excluded from git.

Advanced

  • Use Traefik labels (already in compose) for TLS & host routing.
  • Swap MySQL for MariaDB by changing the image in docker-compose.yml.

About

Deploy WordPress multi sites (PHP–FPM, MySQL, nginx) in Docker with minimal fuss - just supply an `.env` file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published