Skip to content

docs: expand Docker Compose section and fix YAML comments#3033

Merged
bartlomieju merged 2 commits into
mainfrom
docs/docker-compose-improvements
May 21, 2026
Merged

docs: expand Docker Compose section and fix YAML comments#3033
bartlomieju merged 2 commits into
mainfrom
docs/docker-compose-improvements

Conversation

@bartlomieju

Copy link
Copy Markdown
Member

Summary

  • Adds a multi-service Docker Compose example (Deno app + Postgres) with health checks, volumes, and depends_on
  • Removes deprecated version key from Compose examples
  • Fixes invalid // filepath: comments in YAML/text blocks (YAML uses #)

Closes #2863

Test plan

  • Verify Compose examples render correctly
  • Verify other code blocks with fixed comments render correctly

🤖 Generated with Claude Code

@lunadogbot lunadogbot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Replacing // filepath: (invalid YAML) with title="docker-compose.yml" is the right fix, and the second Compose example with the long-form depends_on.db.condition: service_healthy plus pg_isready healthcheck is valid against Compose v2.

  • nit: the .dockerignore, build-context.sh, and Dockerfile blocks switched to # filepath:… comments inside the code rather than the title="…" attribute used by the two yaml blocks above. title= works on non-yaml blocks too (see e.g. text title="log.txt" elsewhere in the repo), so moving these three to title="docker/project-a/.dockerignore" etc. would match the yaml style instead of mixing two conventions in one page.
  • nit: last_modified: 2025-12-16 in the frontmatter wasn't bumped — adding the ~39-line Postgres Compose example is substantive per the repo's pattern.

bartlomieju and others added 2 commits May 21, 2026 12:37
- Add multi-service Compose example with Postgres, health checks,
  volumes, and depends_on
- Remove deprecated `version` key from Compose example
- Fix invalid `// filepath:` comments in YAML/text blocks to use `#`

Closes #2863

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Convert remaining `# filepath:` inline comments in the multi-project
  section to `title="…"` codeblock attributes, matching the convention
  used elsewhere in the repo.
- In the multi-service Compose example: scope `--allow-net=db:5432`,
  add `restart: unless-stopped`, drop the unnecessary db host port
  mapping, and move the password into a `.env`-loaded variable with a
  short note about secrets.
@bartlomieju bartlomieju force-pushed the docs/docker-compose-improvements branch from e2c79f5 to d770bbb Compare May 21, 2026 10:38
@bartlomieju bartlomieju merged commit c308763 into main May 21, 2026
1 of 2 checks passed
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.

Feedback: /runtime/reference/docker/ - Needs Improvement

2 participants