mirror of
https://github.com/gadgethd/ukmesh.git
synced 2026-09-10 09:05:34 +00:00
65 lines
4.5 KiB
Bash
65 lines
4.5 KiB
Bash
# ─────────────────────────────────────────
|
|
# MeshCore Analytics — Environment Config
|
|
# ─────────────────────────────────────────
|
|
# Copy this file to .env and fill in your values.
|
|
# Never commit .env to source control.
|
|
|
|
# ── Database ──────────────────────────────────────────────────────────────────
|
|
POSTGRES_DB=meshcore
|
|
POSTGRES_USER=meshcore
|
|
POSTGRES_PASSWORD=change_me_strong_password
|
|
|
|
# ── MQTT broker ───────────────────────────────────────────────────────────────
|
|
# Internal docker network URL for Mosquitto WebSocket listener
|
|
MQTT_BROKER_URL=ws://mosquitto:9001
|
|
|
|
# Credentials for the backend MQTT client
|
|
MQTT_USERNAME=backend
|
|
MQTT_PASSWORD=change_me_strong_password
|
|
|
|
# ── Redis ─────────────────────────────────────────────────────────────────────
|
|
REDIS_URL=redis://redis:6379
|
|
|
|
# ── JWT ───────────────────────────────────────────────────────────────────────
|
|
# Generate with: node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"
|
|
JWT_SECRET=change_me_64_hex_chars
|
|
|
|
# ── CORS / allowed origins ────────────────────────────────────────────────────
|
|
# Comma-separated list of browser origins allowed to access the API and WebSocket.
|
|
# For local development, the defaults in docker-compose.yml cover localhost.
|
|
# Set this to your production domains for deployment.
|
|
ALLOWED_ORIGINS=https://app.example.com,https://www.example.com
|
|
|
|
# ── Frontend hostname (build-time) ────────────────────────────────────────────
|
|
# If you're running two separate frontends (an analytics app and a public website)
|
|
# on different hostnames, set this to the analytics app's hostname.
|
|
# When a visitor hits this hostname they see the analytics dashboard;
|
|
# all other hostnames serve the public website layout.
|
|
# Leave blank to always show the analytics dashboard (simpler single-domain setup).
|
|
VITE_APP_HOSTNAME=app.example.com
|
|
|
|
# ── MeshCore channel secrets ──────────────────────────────────────────────────
|
|
# Comma-separated list of AES-128 channel secrets for decrypting GroupText packets.
|
|
# Format: name:hex or bare hex (name defaults to first 6 chars of hex).
|
|
# The default MeshCore public channel key is always included automatically.
|
|
# Example: MESHCORE_CHANNEL_SECRETS=mychannel:9cd4e1f2a3b4c5d6e7f8a9b0c1d2e3f4,aabbccddeeff00112233445566778899
|
|
MESHCORE_CHANNEL_SECRETS=
|
|
|
|
# ── Owner portal auth ─────────────────────────────────────────────────────────
|
|
# Map MQTT usernames to owned node public keys (lowercase 64-hex), comma-separated.
|
|
# Format:
|
|
# OWNER_MQTT_USERNAME_MAP=username1=nodeid1|nodeid2,username2=nodeid3
|
|
# Example:
|
|
# OWNER_MQTT_USERNAME_MAP=node1=10cfab...713c95,node-ukmesh=20ed75...fe2ac
|
|
OWNER_MQTT_USERNAME_MAP=
|
|
|
|
# ── Viewshed / elevation API ──────────────────────────────────────────────────
|
|
OPENTOPODATA_API=https://api.opentopodata.org
|
|
|
|
# ── Cloudflare Tunnel ─────────────────────────────────────────────────────────
|
|
# Get from: Cloudflare Zero Trust → Access → Tunnels → your tunnel → token
|
|
CLOUDFLARE_TUNNEL_TOKEN=paste_your_tunnel_token_here
|
|
|
|
# ── App port ──────────────────────────────────────────────────────────────────
|
|
PORT=3000
|