-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
56 lines (51 loc) · 2.95 KB
/
Copy path.env.example
File metadata and controls
56 lines (51 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# MikroMan environment configuration - OPTIONAL, AND MEANT TO STAY THAT WAY.
#
# This file is NOT used by the Docker deployment: docker-compose.yml declares no
# env_file, and .env is excluded from the image. It is read only when running the
# backend directly from the repository root.
#
# Everything an operator normally changes - the router and its credentials, the
# Telegram bot, polling intervals, thresholds, log retention - is configured in
# the UI and stored in the database, because the deployment that needs managing
# most is the RouterOS container, where there is no .env to edit, no shell, and
# no `docker exec`. Values here are start-up defaults for that stored
# configuration, not overrides of it; a setting saved in the dialog wins.
#
# So: prefer the wizard. This file exists for a source checkout and for the few
# things below that genuinely have to be decided before the database is open.
# --- Before the database exists (the only ones that really need to be here) ---
# Where the SQLite file lives. In the container image this is /data/app.db, which
# is the mounted volume - the database, its encryption key and its log all live
# beside each other and move together.
DATABASE_URL=sqlite+aiosqlite:///./data/app.db
# Debug mode: verbose logs, including the per-request logging this app otherwise
# keeps off so it does not fill the router's log ring. Read at import.
DEBUG=false
# --- Application log ----------------------------------------------------------
# Written next to the database and rotated; read back at
# GET /api/v1/logs?source=app or in System Events -> MikroMan Log. A data
# directory that cannot be written to falls back to console logging rather than
# failing to start.
LOG_TO_FILE=true
LOG_FILE_MAX_BYTES=4000000
LOG_FILE_BACKUP_COUNT=3
# --- Polling, for a checkout you are profiling --------------------------------
# Runtime equivalents now live in Settings -> Telemetry Poll Interval; these are
# only for wanting a different default before anything is stored.
#
# POLL_INTERVAL_SECONDS is the telemetry half of the background tick (4 REST
# calls per router); HEAVY_SYNC_INTERVAL_SECONDS is the expensive half - device
# discovery, queue and mangle reconciliation, rollups, quota - which is why it is
# six times slower by default. Limits and pauses set in the UI apply inline and
# never wait for either.
POLL_INTERVAL_SECONDS=10
HEAVY_SYNC_INTERVAL_SECONDS=60
TELEMETRY_STREAM_INTERVAL_SECONDS=3.0
# --- Not here anymore ---------------------------------------------------------
# ROUTEROS_HOST / _PORT / _USE_SSL / _SSL_VERIFY / _USER / _PASSWORD and the
# TELEGRAM_* set were the original configuration surface, and the fields still
# exist as fallbacks - but nothing reads them once a router is configured, which
# is the only state in which the app serves anything. Put the values in the
# database instead: the wizard writes them, `routers.password` stores them
# encrypted, and `app_settings.telegram_bot_token` is what the bot loads at
# start-up.