version: '3.8' services: synthea: build: context: . dockerfile: Dockerfile volumes: - ./modules:/app/modules:ro # Mount modules directory read-only - ./output:/app/output # Mount output directory for patient data - ./.env:/app/.env:ro # Mount environment variables file environment: - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} working_dir: /app command: tail -f /dev/null # Keep container running healthcheck: test: ["CMD", "/app/healthcheck.sh"] interval: 30s timeout: 10s retries: 3 start_period: 5s restart: unless-stopped ports: - "8080:8080" # Only needed if you want to access the Synthea web interface module-generator: build: context: . dockerfile: Dockerfile volumes: - ./modules:/app/modules # Mount modules directory for writing - ./module_generator:/app/module_generator - ./src:/app/src - ./scripts:/app/scripts - ./.env:/app/.env:ro # Mount environment variables file environment: - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} working_dir: /app command: python3 /app/module_generator/run_module_generator.py --batch-size 5 --max-modules 10 --prioritize depends_on: - synthea profiles: - generator # This service won't start by default, only when explicitly requested volumes: synthea-output: driver: local