This repository has been archived on 2026-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
caelum0x 49b183818c Unify gitgram + aitimemachine into the monorepo (de-submodule) and merge vendored engines
Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as
opaque submodule gitlinks on GitHub) into fully-tracked first-party content.

AITM now merges its 7 vendored repos as first-party engines:
- memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts
- git: vendored C git (bundled binary) + gitnexus (in-process code intelligence)
- agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess)

Includes the full session's product build: Gitgram web/mobile/backend features,
AITM website/CLI/MCP, the unified memory layer, engine build tooling
(scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md),
and extensive test suites.

Build artifacts, node_modules, external/, and gemini-cli are gitignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 14:14:09 +03:00

131 lines
2.9 KiB
Plaintext

---
title: "Docker Deployment"
sidebarTitle: "Docker"
---
Deploy Context7 On-Premise with Docker Compose. This guide assumes you have completed the [On-Premise setup](/enterprise/on-premise) and have a valid license key.
## Prerequisites
- Docker and Docker Compose installed
- Context7 license key
## Registry Authentication
Context7 Enterprise images are hosted on `ghcr.io` and require authentication. Log in using your license key:
```bash
LICENSE_KEY="<your-license-key>"
TOKEN=$(curl -s -H "Authorization: Bearer $LICENSE_KEY" \
https://context7.com/api/v1/license/registry-token | jq -r '.token')
docker login ghcr.io -u x-access-token -p $TOKEN
```
Docker stores these credentials locally. `docker compose` will use them automatically when pulling the image. You can also pull manually:
```bash
docker pull ghcr.io/context7/enterprise:latest
```
## Docker Compose
Create a `docker-compose.yml`:
```yaml
services:
context7:
image: ghcr.io/context7/enterprise:latest
container_name: context7
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- context7-data:/data
environment:
- LICENSE_KEY=${LICENSE_KEY}
volumes:
context7-data:
driver: local
```
<Warning>
The `context7-data` volume is critical. It stores your SQLite database (configuration, credentials, indexed libraries) and all vector embeddings. Without a persistent volume, all data is lost when the container restarts or is recreated. Never run without a volume mount in production.
</Warning>
Create a `.env` file in the same directory:
```bash
LICENSE_KEY=ctx7sk-...
```
Start the service:
```bash
docker compose up -d
```
Once the container is running, open `http://localhost:3000` in your browser to complete the setup wizard.
## Operations
### Updating
If your registry login has expired, re-authenticate first:
```bash
LICENSE_KEY="<your-license-key>"
TOKEN=$(curl -s -H "Authorization: Bearer $LICENSE_KEY" \
https://context7.com/api/v1/license/registry-token | jq -r '.token')
docker login ghcr.io -u x-access-token -p $TOKEN
```
Then pull the latest image and restart the container:
```bash
docker compose pull
docker compose up -d
```
Data persists in the named Docker volume across updates.
### Health Check
```bash
curl http://localhost:3000/api/health
```
Example response:
```json
{
"status": "healthy",
"version": "1.0.0",
"setup": "complete",
"license": "configured",
"licenseInfo": {
"valid": true,
"teamSize": 10,
"expiresAt": "2026-06-01T00:00:00.000Z"
},
"repos_parsed": 5,
"uptime": 3600,
"connectivity": {
"llm": "configured",
"llm_provider": "openai",
"embedding": "configured",
"embedding_provider": "openai",
"github": "configured",
"gitlab": "not configured"
}
}
```
## Connecting AI Clients
Once deployed, point your MCP clients to your deployment URL. See [Connecting Your AI Client](/enterprise/on-premise#connecting-your-ai-client) for client-specific instructions.