Skip to content

docs: add commented x-ddev examples to the template service - #120

Open
rfay wants to merge 3 commits into
mainfrom
20261018_hostname_x_ddev
Open

rfay wants to merge 3 commits into
mainfrom
20261018_hostname_x_ddev

Conversation

@rfay

@rfay rfay commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Short Summary (TL;DR)

The template service now has a commented-out x-ddev block that shows every key DDEV supports, and the README shows ddev ssh -s addon-template.

The Issue

The template didn't show the x-ddev extension, so add-on maintainers had to find it in the docs.

This came up in ddev/ddev-selenium-standalone-chrome#99, along with the container ID showing up as the hostname in the ddev ssh -s <service> prompt. This PR doesn't set hostname:: DDEV will set it for add-on services itself in ddev/ddev#8983.

How This PR Solves The Issue

  • docker-compose.addon-template.yaml: a commented-out x-ddev block with a link to the docs and an example for each key:

    • ssh-shell, describe-info, describe-url-port: DDEV v1.24.9+, so they work with the template's >= v1.24.10 constraint.
    • omit-ddev-labels: noted as requiring DDEV v1.25.3+.
    • container-user, pull-images: noted as requiring DDEV v1.25.5+ (not released yet).

    Everything is commented out because each key depends on the add-on. For example, ssh-shell: bash only works if the image includes bash.

  • README_ADDON.md: a ddev ssh -s addon-template row in the usage table.

Manual Testing Instructions

ddev add-on get ddev/ddev-addon-template --pr 120
ddev restart
ddev ssh -s addon-template   # opens sh, since x-ddev is commented out

Uncomment x-ddev: and ssh-shell: bash in .ddev/docker-compose.addon-template.yaml, then:

ddev restart
ddev ssh -s addon-template   # opens bash
ddev describe                # addon-template row shows "Shell: bash"

Automated Testing Overview

No new bats tests. The compose change is comments only.

Release/Deployment Notes

None.

🤖 Generated with Claude Code

rfay and others added 2 commits October 18, 2026 18:48
Without a hostname, Docker uses the container ID, which shows up in the
`ddev ssh -s <service>` prompt. DDEV sets hostname on its own services.

- docker-compose.addon-template.yaml: set
  `hostname: ${DDEV_SITENAME}-addon-template`, and add an `x-ddev` block
  with `ssh-shell: bash` (the default for custom services is `sh`) plus
  commented `describe-info` and `describe-url-port` examples.
- README_ADDON.md: add `ddev ssh -s addon-template` to the usage table.
- update-checker.sh: report compose files that set `container_name:`
  without a matching `hostname:`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DDEV will set hostname for add-on services itself, see
ddev/ddev#8983, so the template and the
update checker don't need to handle it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rfay rfay changed the title feat: add hostname and x-ddev to the template service feat: add x-ddev to the template service Oct 19, 2026
ssh-shell depends on the image, so leave it for the maintainer to enable.
Show every x-ddev key in DDEV HEAD, noting the DDEV version each newer
one needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rfay rfay changed the title feat: add x-ddev to the template service docs: add commented x-ddev examples to the template service Oct 19, 2026

@stasadev stasadev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@rfay

rfay commented Oct 19, 2026

Copy link
Copy Markdown
Member Author

Removed the hostname and changed the x-ddev stuff to commented suggestions, since we're going to automatically provide hostname

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.

2 participants