version: '3.8' services: ssa-r-service: build: . container_name: ssa-r-statistics ports: - "8082:8080" # 主机8082 → 容器8080(REDCap占用8080/8081) environment: # 开发模式:启用热重载(每次请求重新加载工具脚本) - DEV_MODE=true volumes: # 开发环境挂载:支持热重载 - ./plumber.R:/app/plumber.R - ./tools:/app/tools - ./utils:/app/utils - ./tests:/app/tests restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/health"] interval: 30s timeout: 10s retries: 3 start_period: 10s