# TYAPI Server Configuration # 🎯 统一配置文件,包含所有默认配置值 app: name: "TYAPI Server" version: "1.0.0" env: "development" server: host: "0.0.0.0" port: "8080" mode: "debug" read_timeout: 30s write_timeout: 30s idle_timeout: 120s database: host: "localhost" port: "5432" user: "postgres" password: "Pg9mX4kL8nW2rT5y" name: "tyapi_dev" sslmode: "disable" timezone: "Asia/Shanghai" max_open_conns: 25 max_idle_conns: 10 conn_max_lifetime: 300s auto_migrate: true redis: host: "localhost" port: "6379" password: "" db: 0 pool_size: 10 min_idle_conns: 3 max_retries: 3 dial_timeout: 5s read_timeout: 3s write_timeout: 3s cache: default_ttl: 3600s cleanup_interval: 600s max_size: 1000 logger: level: "info" format: "console" output: "stdout" file_path: "logs/app.log" max_size: 100 max_backups: 3 max_age: 7 compress: true use_color: true jwt: secret: "default-jwt-secret-key-change-in-env-config" expires_in: 24h refresh_expires_in: 168h sms: access_key_id: "LTAI5tKGB3TVJbMHSoZN3yr9" access_key_secret: "OCQ30GWp4yENMjmfOAaagksE18bp65" endpoint_url: "dysmsapi.aliyuncs.com" sign_name: "天远数据" template_code: "SMS_474525324" code_length: 6 expire_time: 5m mock_enabled: false rate_limit: daily_limit: 10 hourly_limit: 5 min_interval: 60s ratelimit: requests: 5000 window: 60s burst: 100 monitoring: metrics_enabled: true metrics_port: "9090" tracing_enabled: true tracing_endpoint: "http://localhost:4317" sample_rate: 0.1 health: enabled: true interval: 30s timeout: 10s resilience: circuit_breaker_enabled: true circuit_breaker_threshold: 5 circuit_breaker_timeout: 60s retry_max_attempts: 3 retry_initial_delay: 100ms retry_max_delay: 5s development: debug: true enable_profiler: true enable_cors: true cors_allowed_origins: "http://localhost:3000,http://localhost:3001" cors_allowed_methods: "GET,POST,PUT,PATCH,DELETE,OPTIONS" cors_allowed_headers: "Origin,Content-Type,Accept,Authorization,X-Requested-With"