- Add explicit cookie to release config to fix missing COOKIE file - Add config/runtime.exs for environment-based configuration - Release now supports runtime environment variables - Binary starts successfully without COOKIE errors Environment variables supported: - SYSTANT_MQTT_HOST, SYSTANT_MQTT_PORT - SYSTANT_MQTT_USERNAME, SYSTANT_MQTT_PASSWORD - SYSTANT_STATS_TOPIC, SYSTANT_COMMAND_TOPIC - SYSTANT_PUBLISH_INTERVAL 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
12 lines
645 B
Elixir
12 lines
645 B
Elixir
import Config
|
|
|
|
# Runtime configuration that can use environment variables
|
|
config :systant, Systant.MqttClient,
|
|
host: System.get_env("SYSTANT_MQTT_HOST", "localhost"),
|
|
port: String.to_integer(System.get_env("SYSTANT_MQTT_PORT", "1883")),
|
|
client_id: System.get_env("SYSTANT_CLIENT_ID", "systant"),
|
|
username: System.get_env("SYSTANT_MQTT_USERNAME"),
|
|
password: System.get_env("SYSTANT_MQTT_PASSWORD"),
|
|
stats_topic: System.get_env("SYSTANT_STATS_TOPIC", "system/stats"),
|
|
command_topic: System.get_env("SYSTANT_COMMAND_TOPIC", "system/commands"),
|
|
publish_interval: String.to_integer(System.get_env("SYSTANT_PUBLISH_INTERVAL", "30000")) |