64 lines
2.6 KiB
Bash
64 lines
2.6 KiB
Bash
# ---------------------------------------------------------------------------
|
|
# 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
|
|
# /<prefix>/<imei>. 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
|
|
# Unique per deployment! Two clients with the same id on one broker kick each
|
|
# other off in a reconnect loop (e.g. local dev instance vs production stack).
|
|
MQTT_CLIENT_ID=nodeledge-mqtt-listener
|
|
|
|
# Keys the listener injects into every payload.
|
|
INJECT_IMEI_KEY=imei
|
|
INJECT_DEVICE_KEY=device
|
|
|
|
# API authentication bootstrap. On the FIRST deployment the app_tokens table
|
|
# is empty; on the first authenticated request the api seeds the SHA-256
|
|
# digest of this token. Set a long random value, rotate to real per-app
|
|
# tokens via PUT /configs/app_tokens, then unset this. Ignored once the
|
|
# table has rows (and never on a migrated database).
|
|
BOOTSTRAP_APP_TOKEN=
|
|
# Label for the seeded bootstrap row (informational only).
|
|
BOOTSTRAP_APP_NAME=bootstrap
|
|
|
|
# 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
|
|
|
|
PGADMIN_DEFAULT_EMAIL=user@domain.local
|
|
PGADMIN_DEFAULT_PASSWORD=change_this_bad_password
|
|
PGADMIN_DISABLE_POSTFIX=true
|
|
PGADMIN_LISTEN_ADDRESS=::
|
|
PGADMIN_HOST_PORT=8092 |