Skip to content

Commit bbd3657

Browse files
authored
Merge pull request #158 from IBM/update-docs-testing
Update docs testing
2 parents 56b6cfe + 81ea042 commit bbd3657

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

.github/workflows/ibm-cloud-code-engine.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
# not the secret value.
3636
# Triggers:
3737
# • Every push to `main`
38+
# • Expects a secret called `mcpgateway-dev` in Code Engine. Ex:
39+
# ibmcloud ce secret create \
40+
# --name mcpgateway-dev \
41+
# --from-env-file .env
3842
# ---------------------------------------------------------------
3943

4044
name: Deploy to IBM Code Engine
@@ -156,6 +160,7 @@ jobs:
156160
--name "$CODE_ENGINE_APP_NAME" \
157161
--image "$REGISTRY_HOSTNAME/$ICR_NAMESPACE/$IMAGE_NAME:$IMAGE_TAG" \
158162
--registry-secret "$CODE_ENGINE_REGISTRY_SECRET" \
163+
--env-from-secret mcpgateway-dev \
159164
--cpu 1 --memory 2G
160165
else
161166
echo "🆕 Creating new application…"
@@ -164,6 +169,7 @@ jobs:
164169
--image "$REGISTRY_HOSTNAME/$ICR_NAMESPACE/$IMAGE_NAME:$IMAGE_TAG" \
165170
--registry-secret "$CODE_ENGINE_REGISTRY_SECRET" \
166171
--port "$PORT" \
172+
--env-from-secret mcpgateway-dev \
167173
--cpu 1 --memory 2G
168174
fi
169175

docker-compose.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ services:
2424
# MCP Gateway - the main API server for the MCP stack
2525
# ──────────────────────────────────────────────────────────────────────
2626
gateway:
27-
image: ghcr.io/ibm/mcp-context-forge:0.1.1
27+
image: ghcr.io/ibm/mcp-context-forge:0.1.1 # Use the release MCP Context Forge image
28+
# image: mcpgateway/mcpgateway:latest # Use the local latest image. Run `make docker-prod` to build it.
2829
build:
2930
context: .
3031
dockerfile: Containerfile # Same one the Makefile builds
@@ -45,7 +46,7 @@ services:
4546
# - DATABASE_URL=mongodb://admin:${MONGO_PASSWORD:-changeme}@mongodb:27017/mcp
4647
- CACHE_TYPE=redis # backend for caching (memory, redis, database, or none)
4748
- REDIS_URL=redis://redis:6379/0
48-
- JWT_SECRET_KEY=changeme
49+
- JWT_SECRET_KEY=my-test-key
4950
- BASIC_AUTH_USER=admin
5051
- BASIC_AUTH_PASSWORD=changeme
5152
# - SSL=true

docs/docs/development/review.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,26 @@ Before you read code or leave comments, **always** verify the PR builds and test
4949
make venv install install-dev serve # Install into a fresh venv, and test it runs locally
5050
```
5151

52-
### 3.2 Container Build (if applicable)
52+
### 3.2 Container Build and testing with Postgres and Redis (compose)
5353

5454
```bash
5555
make docker-prod # Build a new image
56+
# Change: image: mcpgateway/mcpgateway:latest in docker-compose.yml to use the local image
5657
make compose-up # spins up the Docker Compose stack
58+
59+
# Test the basics
60+
curl -k https://localhost:4444/health` # {"status":"healthy"}
61+
export MCPGATEWAY_BEARER_TOKEN=$(python3 -m mcpgateway.utils.create_jwt_token --username admin --exp 0 --secret my-test-key)
62+
curl -sk -H "Authorization: Bearer $MCPGATEWAY_BEARER_TOKEN" http://localhost:4444/version | jq -c '.database, .redis'
63+
64+
# Add an MCP server to http://localhost:4444 then check logs:
65+
make compose-logs
5766
```
5867

5968
### 3.3 Automated Tests
6069

6170
```bash
62-
make test # or `pytest`, `npm test`, etc.
71+
make test # or `pytest`
6372
```
6473

6574
### 3.4 Lint & Static Analysis

0 commit comments

Comments
 (0)