Updated error handling mechanisms in main.py to improve clarity and efficiency. This includes consolidating error messages and enhancing the structure of exception handling across asynchronous functions.
20 lines
No EOL
660 B
YAML
20 lines
No EOL
660 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
telegram-mcp-server:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: telegram_mcp_server
|
|
# Load environment variables from a .env file in the same directory
|
|
env_file:
|
|
- .env
|
|
# Keep stdin open and allocate a pseudo-TTY, crucial for stdio MCP servers
|
|
stdin_open: true
|
|
tty: true
|
|
# 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
|
|
restart: unless-stopped |