Repository navigation
Conversation
…-docker-compose-self-hosting
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #98
Stacked on #99. Widgets need its duplicate-streaming fix when the agent uses
.envkeys, which is the case this PR enables. The commits from #99 drop out of this diff once it's merged.Summary
Self-host the app, agent and MCP server with one command, using the agent's own keys.
docker-compose.yml:agent(internal only, health check on/health),mcp(127.0.0.1:3100) andapp(127.0.0.1:${APP_PORT:-3000}), all withrestart: unless-stopped. The agent readsapps/agent/.env; the app reaches the agent athttp://agent:8123and MCP athttp://mcp:3100/mcp.apps/agent/Dockerfile: uv image,uv sync --frozen --no-dev, copies onlymain.py,src/andskills/.docker/Dockerfile.mcp: builds from the workspace root, becauseapps/mcpdepends on@repo/design-system(workspace:*). The existingapps/mcp/Dockerfileexpects a lockfile that doesn't exist.NEXT_PUBLIC_SERVER_KEYS(build arg indocker/Dockerfile.app; compose sets it totrue):hasKeysis true without browser keys, so the prompt is skipped and requests go out without key headers. The agent then uses its.envkeys. It's unset by default, so the hosted BYOK flow is unchanged and browser keys still work when the flag is on.docs/getting-started.md: a "Run with Docker Compose" section and the new variable.Testing
docker compose build: all three images build from a clean checkout of this branch.docker compose up -d: chat works atlocalhostwith keys only inapps/agent/.env; no browser prompt. The MCPinitializerequest succeeds athttp://localhost:3100/mcp.NEXT_PUBLIC_SERVER_KEYS=true, the provider reports keys as configured and sends no browser key headers. It fails without the change.pnpm testandpnpm lintpass; agent tests pass.