68 lines
2.6 KiB
Bash
68 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=u9UHTgucnH7nZ5S9Z38ilDpiasE17rWc
|
|
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=oem.nodeledge.se
|
|
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=vivab/#
|
|
# 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 (the local dev instance and the production
|
|
# stack must not share this value).
|
|
MQTT_CLIENT_ID=nodeledge-mqtt-listener-local-test
|
|
|
|
# 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=IPyoPDwPNMOeHEd9QsBM42NrLvJTZx3Qf4CKCJakDrlJ4Qwz0BwKdRMB56AAIIGb
|
|
# 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
|
|
API_HOST_PORT=18080
|
|
MQTT_HOST_PORT=2883
|
|
PGADMIN_HOST_PORT=8092
|
|
|
|
# API: hard cap for the limit query parameter.
|
|
API_MAX_LIMIT=10000
|
|
|
|
LOG_LEVEL=INFO
|
|
|
|
|
|
PGADMIN_DEFAULT_EMAIL=jonas@bengtsson.ws
|
|
PGADMIN_DEFAULT_PASSWORD=change_this_bad_password
|
|
PGADMIN_DISABLE_POSTFIX=true
|
|
PGADMIN_LISTEN_ADDRESS=0.0.0.0
|
|
|
|
BOOTSTRAP_ADMIN_USER=admin
|
|
BOOTSTRAP_ADMIN_PASSWORD=some_random_password
|