Provide a minimal docker compose fail to demonstrate connectivity and interoperability of versions for both the MCP component and postgres.
For this, it would be good to know what should be healtcheck for the MCP part.
Example (draft)
---
services:
postgres:
image: postgres:15
environment:
POSTGRES_DB: mcpdb
POSTGRES_USER: mcpuser
POSTGRES_PASSWORD: mcppass
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/00_init.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
retries: 5
mcp-server:
image: crystaldba/postgres-mcp:latest
environment:
DATABASE_URI: "postgresql://mcpuser:mcppass@postgres:5432/mcpdb"
depends_on:
postgres:
condition: service_healthy
ports:
- "8080:8000"
# -------- Health-Check --------
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request,sys,socket; socket.setdefaulttimeout(2); sys.exit(0 if urllib.request.urlopen('http://localhost:8000/sse').status==200 else 1)"]
interval: 5s # wie bisher
retries: 5
start_period: 20s
Provide a minimal docker compose fail to demonstrate connectivity and interoperability of versions for both the MCP component and postgres.
For this, it would be good to know what should be healtcheck for the MCP part.
Example (draft)