1
0

config.yaml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. server:
  2. port: "8080"
  3. mode: "debug" # debug, release, test
  4. read_timeout: 60
  5. write_timeout: 60
  6. database:
  7. postgres:
  8. host: "localhost"
  9. port: "5432"
  10. user: "postgres"
  11. password: "postgres"
  12. dbname: "iot_base_station"
  13. max_open_conns: 25
  14. max_idle_conns: 5
  15. conn_max_lifetime: 300
  16. influxdb:
  17. url: "http://localhost:8086"
  18. token: "influxdb-token"
  19. org: "iot-org"
  20. bucket: "iot-data"
  21. timeout: 10
  22. redis:
  23. host: "localhost"
  24. port: "6379"
  25. password: ""
  26. db: 0
  27. pool_size: 10
  28. nats:
  29. url: "nats://localhost:4222"
  30. subject_prefix: "iot"
  31. mqtt:
  32. broker: "tcp://localhost:1883"
  33. client_id: "iot-gateway"
  34. username: ""
  35. password: ""
  36. keep_alive: 60
  37. qos: 1
  38. coap:
  39. address: ":5683"
  40. path: "/iot"
  41. max_message_size: 1024
  42. lora:
  43. server_url: "http://localhost:8080"
  44. application_id: "iot-app"
  45. access_key: "lora-access-key"
  46. jwt:
  47. secret: "iot-jwt-secret"
  48. expire: 86400 # 24 hours
  49. alert:
  50. enabled: true
  51. check_interval: 30 # seconds
  52. max_alerts_per_device: 10
  53. suppression_window: 300 # seconds
  54. notification:
  55. email:
  56. enabled: false
  57. smtp_host: "smtp.example.com"
  58. smtp_port: 587
  59. username: "[email protected]"
  60. password: "email-password"
  61. from: "[email protected]"
  62. webhook:
  63. enabled: true
  64. url: "http://localhost:8081/webhook"
  65. timeout: 10
  66. monitoring:
  67. enabled: true
  68. metrics_path: "/metrics"
  69. health_check_path: "/health"
  70. logging:
  71. level: "info"
  72. output: "logs/app.log"
  73. max_size: 100 # MB
  74. max_backups: 3
  75. max_age: 28 # days