The Drupal Docker Template gives you a Docker Compose repository for running a Composer-managed Drupal site. It includes Traefik, MariaDB, Solr, and the LibOps Drupal PHP/nginx image, and is designed to be managed with sitectl-drupal.
Docs:
- sitectl installed on the host that will run the site.
sitectl-drupalinstalled for Drupal create, validation, healthcheck, and helper commands.- Docker with the Compose v2 plugin installed on the same host.
Create a new Drupal site from this template:
sitectl create drupal/default \
--template-repo https://github.com/libops/drupal \
--path ./my-drupal-site \
--type local \
--checkout-source template \
--default-contextThe site is served through Traefik at http://localhost. The first boot installs Drupal from the checked-in configuration.
The drupal service builds this checkout on top of the LibOps Drupal base image. The Dockerfile copies Composer lockfiles and assets before local modules, themes, config, and rootfs additions 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.
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 -dCheck the site and context configuration with sitectl healthcheck and sitectl validate:
sitectl healthcheck
sitectl validateUpdate image tags or pin a full image reference with sitectl image:
sitectl image set --tag drupal=nginx-1.30.3-php84
sitectl image set --image drupal=libops/drupal: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 convergePublish 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-custom --domain drupal.localhost
sitectl set ingress enabled --mode https-letsencrypt --domain drupal.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 convergeThe ingress component writes INGRESS_HOSTNAMES as comma-separated hostnames and INGRESS_SCHEME as http or https into the app container. Runtime config is rendered from those values during container startup, so generated sites should not carry separate app URL env vars for the same public route.
See the Drupal sitectl plugin docs for Drush helpers, development mode, sync operations, login links, and Drupal-specific jobs.
The Makefile is intentionally small. It only keeps Drupal-specific targets that are not core sitectl operations:
sitectl deploy
make clean
make test
make lintUse sitectl compose ... and sitectl set ... directly for normal stack operations.
traefikis the only published ingress.drupalis built from this repository and based on the LibOps Drupal PHP/nginx image.mariadbstores application data.solrprovides search.- Secrets are generated into
./secrets/.
Drupal code is Composer-managed. Custom modules and themes belong under web/modules/custom and web/themes/custom.
The Docker Compose template and LibOps-specific setup in this repository are licensed under the MIT License. The Drupal recommended project is licensed separately under the GNU General Public License v2; see LICENSE.drupal-recommended-project.