# --------------------------------------------------------------------------- # Copy to .env (docker compose) or paste into Portainer's "Environment # variables" section when deploying the stack. Everything has a working # default except POSTGRES_PASSWORD. # --------------------------------------------------------------------------- # PostgreSQL (db container). Pick a strong password; avoid characters that are # reserved in URLs (@ : / ? # % &) or URL-encode them, since the password is # embedded in the DB_DSN connection string. POSTGRES_USER=nodeledge POSTGRES_PASSWORD=change-me-strong-password POSTGRES_DB=nodeledge # MQTT broker the listener subscribes to. The default points at the optional # "broker" test service; in production set this to your real broker host. MQTT_BROKER_HOST=broker MQTT_BROKER_PORT=1883 MQTT_USERNAME= MQTT_PASSWORD= # Subscription filter. Default "/+/+" matches topics on the form # //. Use "#", "/up/#", ... to widen it (the IMEI is then # always taken from the LAST topic segment). MQTT_TOPIC_FILTER=/+/+ # 0 = at most once, 1 = at least once (duplicate rows possible after reconnects) MQTT_QOS=1 MQTT_CLIENT_ID=nodeledge-mqtt-listener # Keys the listener injects into every payload. INJECT_IMEI_KEY=imei INJECT_DEVICE_KEY=device # Comma-separated payload keys searched for a device timestamp (first # parseable one wins). Accepts ISO 8601 strings, epoch seconds or epoch # milliseconds. Rows without a parseable timestamp keep payload_time NULL. PAYLOAD_TIME_KEYS=timestamp,time,ts # Host ports. On Windows, 1883 often falls into a Hyper-V excluded port range # (netsh interface ipv4 show excludedportrange protocol=tcp); 2883 avoids it. # 8080 frequently collides with other dev tools; 18080 avoids that. API_HOST_PORT=18080 MQTT_HOST_PORT=2883 # API: hard cap for the limit query parameter. API_MAX_LIMIT=10000 LOG_LEVEL=INFO