Skip to content

docs: separate the mounted and side-by-side container sharing cases - #2

Merged
lesnik512 merged 1 commit into
mainfrom
docs/shared-container-owner
Oct 17, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
docs/shared-container-owner

Conversation

@lesnik512

Copy link
Copy Markdown
Member

The setup_di row said one app should own the lifespan and the others pass manage_lifespan=False. That holds when the FastMCP server is mounted in a FastAPI app whose lifespan runs it, but read as general advice.

The row now covers both cases, matching the modern-di docs:

  • Mounted in another app whose lifespan runs it: that app owns the container, FastMCP passes manage_lifespan=False. Links the FastMCP integration docs section.
  • Separate lifecycles: pass manage_lifespan=False to every setup_di and open and close the container yourself.

@lesnik512
lesnik512 merged commit 4df54da into main Oct 17, 2026
12 checks passed
@lesnik512
lesnik512 deleted the docs/shared-container-owner branch October 17, 2026 13:21
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