Quellcode durchsuchen

Add Docker Compose support

Lukas Goldschmidt vor 1 Monat
Ursprung
Commit
4ee195f730
4 geänderte Dateien mit 44 neuen und 1 gelöschten Zeilen
  1. 11 0
      .dockerignore
  2. 1 1
      Dockerfile
  3. 19 0
      README.md
  4. 13 0
      docker-compose.yml

+ 11 - 0
.dockerignore

@@ -0,0 +1,11 @@
+.git
+.gitignore
+__pycache__
+.pytest_cache
+.venv
+uvicorn.log
+server.pid
+*.pyc
+*.pyo
+*.pyd
+*.log

+ 1 - 1
Dockerfile

@@ -9,7 +9,7 @@ RUN pip install --no-cache-dir -r requirements.txt
 # Copy server code
 COPY . ./
 
-# Default values (override in compose)
+# Default values (override at runtime if needed)
 ENV HOST=0.0.0.0
 ENV PORT=8505
 

+ 19 - 0
README.md

@@ -18,6 +18,25 @@ pip install -r requirements.txt
 
 Default URL base: `http://127.0.0.1:8505`
 
+### Docker / Compose
+
+Build and start the server with Compose from the project directory:
+
+```bash
+docker compose up -d --build
+```
+
+The container listens on port `8505` and exposes the MCP SSE transport at:
+
+- `http://127.0.0.1:8505/mcp/sse`
+- `http://127.0.0.1:8505/health`
+
+To stop it:
+
+```bash
+docker compose down
+```
+
 ## Tools
 
 - `get_price`

+ 13 - 0
docker-compose.yml

@@ -0,0 +1,13 @@
+services:
+  crypto-mcp:
+    build:
+      context: .
+      dockerfile: Dockerfile
+    image: crypto-mcp:local
+    environment:
+      HOST: 0.0.0.0
+      PORT: 8505
+      PYTHONUNBUFFERED: "1"
+    ports:
+      - "8505:8505"
+    restart: unless-stopped