-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (67 loc) · 2.27 KB
/
docker-compose.yml
File metadata and controls
80 lines (67 loc) · 2.27 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
services:
iot-cloud-mcp:
image: ghcr.io/dadadadas111/iot-cloud-mcp:latest
container_name: iot-cloud-mcp
restart: unless-stopped
ports:
- '${PORT:-3001}:3001'
environment:
# Server
NODE_ENV: ${NODE_ENV:-production}
PORT: ${PORT:-3001}
HOST: ${HOST:-0.0.0.0}
# IoT Cloud API
IOT_API_BASE_URL: ${IOT_API_BASE_URL}
IOT_API_TIMEOUT: ${IOT_API_TIMEOUT:-30000}
# Redis Configuration
REDIS_HOST: ${REDIS_HOST:-redis}
REDIS_PORT: ${REDIS_PORT:-6379}
REDIS_PASSWORD: ${REDIS_PASSWORD:-}
REDIS_DB: ${REDIS_DB:-0}
# CORS Configuration (always enabled for MCP)
ENABLE_CORS: 'true'
CORS_ORIGINS: ${CORS_ORIGINS:-*}
# Rate Limiting
ENABLE_RATE_LIMIT: ${ENABLE_RATE_LIMIT:-true}
RATE_LIMIT_MAX: ${RATE_LIMIT_MAX:-100}
RATE_LIMIT_WINDOW: ${RATE_LIMIT_WINDOW:-60000}
# Logging
LOG_LEVEL: ${LOG_LEVEL:-info}
BASE_URL: ${BASE_URL:-https://mcp.dash.id.vn}
# MCP Session
MCP_SESSION_TTL: ${MCP_SESSION_TTL:-3600}
# Alias Redis (External - partner alias → API key lookup)
ALIAS_REDIS_HOST: ${ALIAS_REDIS_HOST}
ALIAS_REDIS_PORT: ${ALIAS_REDIS_PORT:-6379}
ALIAS_REDIS_PASSWORD: ${ALIAS_REDIS_PASSWORD:-}
ALIAS_REDIS_DB: ${ALIAS_REDIS_DB:-0}
ALIAS_REDIS_KEY_PREFIX: ${ALIAS_REDIS_KEY_PREFIX:-alias}
depends_on:
- redis
networks:
- iot-network
logging:
driver: 'json-file'
options:
max-size: '10m'
max-file: '3'
# TODO(ops/production): Replace local Redis with external managed Redis service.
# Current setup is co-located with MCP container — acceptable for dev/staging
# since Redis only persists session metadata (non-critical, TTL-based).
# For production: use managed Redis (e.g., Redis Cloud, AWS ElastiCache),
# configure REDIS_PASSWORD, enable TLS, remove this local service block.
redis:
image: redis:7-alpine
container_name: iot-cloud-redis
restart: unless-stopped
ports:
- '${REDIS_PORT:-6379}:6379'
volumes:
- redis-data:/data
networks:
- iot-network
networks:
iot-network:
driver: bridge
volumes:
redis-data: