Skip to content

libops/wp

Repository files navigation

WordPress Bedrock Docker Template

The WordPress Bedrock Docker Template gives you a Docker Compose repository for running a Composer-managed Bedrock WordPress site. It includes Traefik, MariaDB, and the LibOps WordPress PHP/nginx image, and is designed to be managed with sitectl-wp.

Docs:

Requirements

  • sitectl installed on the host that will run the site.
  • sitectl-wp installed for WordPress create, validation, healthcheck, and helper commands.
  • Docker with the Compose v2 plugin installed on the same host.

Quick start

Create a new WordPress site from this template:

sitectl create wp/default \
  --template-repo https://github.com/libops/wp \
  --path ./my-wordpress-site \
  --type local \
  --checkout-source template \
  --default-context

The site is served through Traefik at http://localhost. The first boot runs wp-cli automatically. The default admin account is admin; its password is generated in ./secrets/WORDPRESS_ADMIN_PASSWORD.

Local image build

The wp service builds this checkout on top of the LibOps WordPress base image. The Dockerfile copies Composer lockfiles before local plugins and themes so Docker can reuse dependency layers when only site customizations change. Local builds use the platform selected by the Docker CLI and do not push images.

Basic Operations

Run these from the generated checkout, or add --context <name> when operating from elsewhere.

Start or update the stack with sitectl compose:

sitectl compose up --remove-orphans -d

Check the site and context configuration with sitectl healthcheck and sitectl validate:

sitectl healthcheck
sitectl validate

Update image tags or pin a full image reference with sitectl image:

sitectl image set --tag wp=nginx-1.30.3-php84
sitectl image set --image wp=libops/wp:nginx-1.30.3-php84@sha256:...

Enable local development bind mounts with sitectl set, then apply the component change with sitectl converge:

sitectl set dev-mode enabled
sitectl converge

Publish a domain, switch HTTP/TLS mode, configure Let's Encrypt, trust upstream proxies, or tune upload limits with the ingress component:

sitectl set ingress enabled --mode https-default --domain wordpress.localhost
sitectl set ingress enabled --mode https-letsencrypt --domain wordpress.example.org --acme-email ops@example.org
sitectl set ingress enabled --trusted-ip 203.0.113.10/32 --max-upload-size 2G --upload-timeout 10m
sitectl converge

Run WordPress-specific helpers documented in the WordPress plugin docs:

sitectl wp cli plugin list
sitectl wp composer
sitectl wp db export ./backup.sql
sitectl wp db import ./backup.sql

See the WordPress sitectl plugin docs for WP-CLI, Composer, plugin/theme maintenance, lifecycle operations, and database helpers.

Makefile

The Makefile is intentionally small. It only keeps WordPress-specific targets that are not core sitectl operations:

sitectl deploy
make test
make lint

Use sitectl compose ..., sitectl traefik ..., and sitectl set ... directly for normal stack operations.

Template notes

  • traefik is the only published ingress.
  • wp is built from this repository and based on the LibOps WordPress PHP/nginx image.
  • mariadb stores application data.
  • wordpress-uploads persists uploaded files without hiding Composer-managed dependencies.
  • composer.json manages WordPress core and downstream plugin/theme dependencies.

Custom plugins and themes belong under web/app/plugins, web/app/themes, or web/app/mu-plugins. PHP mail() is routed through msmtp and relays through the Docker host by default.

License

The Docker Compose template and LibOps-specific setup in this repository are licensed under the MIT License. WordPress is licensed separately under the GNU General Public License v2 or later; see LICENSE.wordpress.

Attribution

This template uses Bedrock for Composer-managed WordPress layout and is based on the LibOps WordPress image derived from the Islandora Buildkit PHP/nginx base.

About

No description, website, or topics provided.

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.wordpress

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors