Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (35 loc) · 1.52 KB
/
Copy pathdocker-compose.yml
File metadata and controls
36 lines (35 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
version: '3.8'
services:
telegram-mcp:
build:
context: .
dockerfile: Dockerfile
target: production
container_name: telegram-mcp
# Load environment variables from a .env file in the same directory
env_file:
- .env
# Serve streamable HTTP so one long-lived container is shared by all MCP
# clients (see the Transports section in README.md). MCP_HOST must be
# 0.0.0.0 inside the container for the published port to work.
environment:
MCP_TRANSPORT: http
MCP_HOST: 0.0.0.0
# The endpoint is unauthenticated — publish on localhost only.
ports:
- "127.0.0.1:8765:8765"
# Optional: Uncomment the following lines to mount a local directory
# for persisting the Telegram session file if NOT using TELEGRAM_SESSION_STRING.
# Replace './telegram_sessions' with your desired host path.
# volumes:
# - ./telegram_sessions:/app
volumes:
# Voice/video-note transcript cache (SQLite, see telegram_mcp/transcription.py).
# Without this mount the cache lives only in the container's writable
# layer and is lost on every `docker compose build`. It holds plaintext
# personal-chat transcripts, so this directory should get its own
# backup/retention policy rather than riding along with a general backup.
# Host directory must be readable/writable by uid 1000 (appuser):
# mkdir -p ./transcript_cache && chown 1000:1000 ./transcript_cache
- ./transcript_cache:/app/data/transcripts
restart: unless-stopped