mirror of
https://github.com/tiennm99/tiennm99bot.git
synced 2026-10-15 14:16:49 +00:00
revert: restore code fallbacks for config defaults
This reverts commit 153fc21. With no fallback in code, the deploy
crash-looped: Coolify keeps an entry for every variable compose.yml has
referenced, and empty entries appear to reach the containers as empty
values instead of the compose defaults.
This commit is contained in:
1 parent
153fc211cf
commit
e418bf3390
17 files changed
+100
-214
No files matched your search
@@ -34,20 +34,15 @@ Copy [`.env.example`](../.env.example) → `.env` (gitignored) and fill in.
|
||||
| `MODULES` | optional | CSV; empty = all modules, including any added later |
|
||||
| `OWNER_ID` | optional | Telegram user id for owner-only commands, the deploy DM, and the `/addsticker` pack owner. Unset = owner-only commands are denied and `/addsticker` refuses |
|
||||
| `ADMIN_IDS` | optional | CSV of Telegram user ids for admin-only commands |
|
||||
| `STICKER_PACK_NAME` | optional | set `/addsticker` writes to; `compose.yml` default `miti99_by_miti99bot`. See [sticker packs](sticker-packs.md) |
|
||||
| `STICKER_PACK_NAME` | optional | set `/addsticker` writes to; default `miti99_by_miti99bot`. See [sticker packs](sticker-packs.md) |
|
||||
| `LOL_PANDASCORE_TOKEN` | optional | PandaScore API token for the lol module (free tier) — secret, never logged; without it every `/lol*` fetch fails (stale cache may still serve briefly) |
|
||||
| `RENDERER_URL` | leave unset | base URL of the animation renderer; fixed by `compose.yml` to the bundled renderer (`http://renderer:3000`), so a Coolify value is ignored |
|
||||
| `LOG_LEVEL` | optional | `debug`, `info`, `warn`, or `error`; `compose.yml` default `info`; logs are JSON on stdout |
|
||||
| `LOG_LEVEL` | optional | `debug`, `info` (default), `warn`, or `error`; logs are JSON on stdout |
|
||||
| `GOLD_VNAPP_API_KEY` | optional | VNAppMob key — secret; empty = the gold module fetches one and caches it in MongoDB |
|
||||
| `KV_PROVIDER` | leave unset | `memory` or `mongodb`; unset = `mongodb` when `MONGO_URL` is set, otherwise `memory` |
|
||||
| `PORT` | leave unset | health server port; fixed to `8080` by `compose.yml`, which the health check uses |
|
||||
| `PORT` | leave unset | health server port; default `8080` |
|
||||
| `SOURCE_COMMIT` | never set | provided by Coolify at runtime for the deploy DM (see step 5 below) |
|
||||
|
||||
Defaults live in `compose.yml` only (`${VAR:-default}`); the code has no
|
||||
fallback values. `PORT`, `LOG_LEVEL`, and (for `/addsticker`)
|
||||
`STICKER_PACK_NAME` must therefore be set when running outside compose — a
|
||||
missing or invalid `PORT` or `LOG_LEVEL` stops the bot at startup.
|
||||
|
||||
Stock, coin, and gold provider URL overrides are not supported in runtime env;
|
||||
modules use coded defaults. There is no `TELEGRAM_WEBHOOK_SECRET`: long polling
|
||||
has no webhook.
|
||||
|
||||
@@ -22,14 +22,14 @@ Single-shot: one message replying to the media to add. No conversation state.
|
||||
|
||||
## Configuration
|
||||
|
||||
| Env | `compose.yml` default | Meaning |
|
||||
| Env | Default | Meaning |
|
||||
|---|---|---|
|
||||
| `STICKER_PACK_NAME` | `miti99_by_miti99bot` | The Telegram set to write to; required — unset, `/addsticker` refuses |
|
||||
| `STICKER_PACK_NAME` | `miti99_by_miti99bot` | The Telegram set to write to |
|
||||
| `OWNER_ID` | — | Must be the account that **owns** that set |
|
||||
|
||||
`OWNER_ID` is reused rather than given a sticker-specific twin because
|
||||
`addStickerToSet` takes the **set owner's** user ID, not the caller's, and the
|
||||
standard pack belongs to the bot owner. Point `OWNER_ID` at the owning account if
|
||||
default pack belongs to the bot owner. Point `OWNER_ID` at the owning account if
|
||||
the configured pack belongs to someone else.
|
||||
|
||||
The caller's identity is used nowhere. That is what makes the command stateless:
|
||||
|
||||
Reference in new issue
Block a user