UNPKG

current-time-timezone-server

Version:

MCP服务器,提供NTP校准的当前时间和时区相关功能,支持stdio和HTTP/SSE,可配置host和protocol,支持.env文件,返回指定时区的本地时间

20 lines (19 loc) 503 B
version: '3.8' services: current-time-server: build: . ports: - "3000:3000" environment: - NODE_ENV=production - PROTOCOL=http - HOST=0.0.0.0 - PORT=3000 - NTP_SERVER=pool.ntp.org restart: unless-stopped healthcheck: test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"] interval: 30s timeout: 10s retries: 3 start_period: 40s