Skip to content

refactor(compose): make docker-compose.yml composable via include/extends - #153

Draft
yusufhm wants to merge 1 commit into
developfrom
feature/GOVCMS-15421-composable-services
Draft

yusufhm wants to merge 1 commit into
developfrom
feature/GOVCMS-15421-composable-services

Conversation

@yusufhm

@yusufhm yusufhm commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

[GOVCMS-15421]

Split the monolithic docker-compose.yml into a static root file plus opt-in fragments under .docker/compose/, so it no longer needs to be mutated per project. Previously, scripts/scaffold-init.sh sed-substituted {{ }} tokens and swapped YAML anchors directly in docker-compose.yml, and CI stripped lines by ### comment marker - meaning no upstream diff could apply cleanly across the projects built from this scaffold.

  • cli/nginx/php/test/chrome now extend shared service definitions from .docker/compose/_common.{default,paas}.yml, selected via GOVCMS_VOLUMES in .env instead of a sed'd anchor swap.
  • test, chrome, solr and redis become opt-in via include: entries; test and chrome are additionally gated behind the "test" Compose profile since they're local/CI-only and must never deploy.
  • mariadb gets a healthcheck (mysqladmin ping) replacing the imperative dockerize -wait exec into the test service from ahoy up/build.
  • Local-only SSH-agent mounting moves from ###-marked lines to .docker/compose/local.yml, loaded via COMPOSE_FILE in .env - freeing docker-compose.override.yml for projects' own overrides.
  • ahoy commands that exec into test (lint, test-behat, test-phpunit, debug) now bring it up under its profile first.

This is a draft example for a Lagoon maintainer to validate parser support for include/extends/profiles against - not yet merged to develop/main.

…ends

[GOVCMS-15421]

Split the monolithic docker-compose.yml into a static root file plus
opt-in fragments under .docker/compose/, so it no longer needs to be
mutated per project. Previously, scripts/scaffold-init.sh sed-substituted
{{ }} tokens and swapped YAML anchors directly in docker-compose.yml, and
CI stripped lines by ### comment marker - meaning no upstream diff could
apply cleanly across the projects built from this scaffold.

- cli/nginx/php/test/chrome now extend shared service definitions from
  .docker/compose/_common.{default,paas}.yml, selected via GOVCMS_VOLUMES
  in .env instead of a sed'd anchor swap.
- test, chrome, solr and redis become opt-in via `include:` entries;
  test and chrome are additionally gated behind the "test" Compose
  profile since they're local/CI-only and must never deploy.
- mariadb gets a healthcheck (mysqladmin ping) replacing the imperative
  `dockerize -wait` exec into the test service from ahoy up/build.
- Local-only SSH-agent mounting moves from ###-marked lines to
  .docker/compose/local.yml, loaded via COMPOSE_FILE in .env - freeing
  docker-compose.override.yml for projects' own overrides.
- ahoy commands that exec into test (lint, test-behat, test-phpunit,
  debug) now bring it up under its profile first.

This is a draft example for a Lagoon maintainer to validate parser
support for include/extends/profiles against - not yet merged to
develop/main.
@yusufhm yusufhm changed the title refactor(compose): make docker-compose.yml composable via include/ext… refactor(compose): make docker-compose.yml composable via include/extends Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant