any-env-and-bind-address #58

Merged
moon merged 7 commits from any-env-and-bind-address into dev 2025-06-13 14:54:28 -07:00
Collaborator

Many fixes and small changes needed for my environment:

  • make sure database location is pulled from config, it looked hardcoded
  • allow any env string for KEMOVERSE_ENV (helps a lot testing misskey and pleroma backends)
  • whitelisting default, force boolean, default true
  • validate bot user, force domain lowercase, keep username case-sensitive
  • make the bind port and address configurable, default to localhost:5000

I'm working in hotels and stuff and needed to disable bind on all addresses, can be easily overridden in config.

Many fixes and small changes needed for my environment: * make sure database location is pulled from config, it looked hardcoded * allow any env string for KEMOVERSE_ENV (helps a lot testing misskey and pleroma backends) * whitelisting default, force boolean, default true * validate bot user, force domain lowercase, keep username case-sensitive * make the bind port and address configurable, default to localhost:5000 I'm working in hotels and stuff and needed to disable bind on all addresses, can be easily overridden in config.
moon added 4 commits 2025-06-13 13:23:30 -07:00
VD15 reviewed 2025-06-13 13:41:15 -07:00
bot/config.py Outdated
@ -13,8 +14,6 @@ def get_config_file() -> str:
env: str | None = environ.get('KEMOVERSE_ENV')
if not env:
raise ConfigError('Error: KEMOVERSE_ENV is unset')
if not (env in ['prod', 'dev']):
Collaborator

We might want to remove this check from the database migration script as well, I think we have an identical one there: https://git.waifuism.life/waifu/kemoverse/src/branch/any-env-and-bind-address/setup_db.py#L60

We might want to remove this check from the database migration script as well, I think we have an identical one there: https://git.waifuism.life/waifu/kemoverse/src/branch/any-env-and-bind-address/setup_db.py#L60
VD15 marked this conversation as resolved
moon added 1 commit 2025-06-13 13:48:07 -07:00
moon added 1 commit 2025-06-13 13:52:11 -07:00
moon added 1 commit 2025-06-13 13:57:12 -07:00
VD15 approved these changes 2025-06-13 14:25:16 -07:00
moon merged commit 7c4fd5fc41 into dev 2025-06-13 14:54:28 -07:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: waifu/kemoverse#58
No description provided.