Update D4A Configuration (#4166)

* Update D4A Configuration

D4A had some breaking config changes so this commit fixes them and gets us back into compliance with upstream. And since we run in a docker container we can use the /data/storage default.

* Update D4A Configuration to harmonise with bot mode

Change the default config for D4A to align with bot mode default in mdad. This should also avert a bit of a mess of a potential bug.

* Change D4A Room State Backing Store variable name and fix SPDX Headers

* Align D4A config with new schema

* Fix D4A Config Lint Error

* Update D4A SPDX Entries

* Do not use double quotes around `to_json` values

---------

Co-authored-by: Slavi Pantaleev <slavi@devture.com>
This commit is contained in:
Catalan Lover
2025-03-13 19:20:09 +01:00
committed by GitHub
parent dc581d0b7a
commit 0086ae7f58
8 changed files with 40 additions and 7 deletions

View File

@ -1,5 +1,6 @@
{#
SPDX-FileCopyrightText: 2024 MDAD project contributors
SPDX-FileCopyrightText: 2024 - 2025 Catalan Lover <catalanlover@protonmail.com>
SPDX-FileCopyrightText: 2024 Suguru Hirahara
SPDX-License-Identifier: AGPL-3.0-or-later
@ -18,8 +19,14 @@ db:
# A room you have created that scopes who can access the appservice.
# See docs/access_control.md
adminRoom: "{{ matrix_appservice_draupnir_for_all_master_control_room_alias }}"
adminRoom: {{ matrix_appservice_draupnir_for_all_config_adminRoom | to_json }}
# This is a web api that the widget connects to in order to interact with the appservice.
webAPI:
port: 9000
# The directory the bot should store various bits of information in
dataPath: "/data"
roomStateBackingStore:
enabled: {{ matrix_appservice_draupnir_for_all_config_roomStateBackingStore_enabled | to_json }}

View File

@ -1,5 +1,6 @@
{#
SPDX-FileCopyrightText: 2024 MDAD project contributors
SPDX-FileCopyrightText: 2024 - 2025 Catalan Lover <catalanlover@protonmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
@ -73,3 +74,20 @@ commands:
- "brigading"
- "harassment"
- "disagreement"
# Safe mode provides recovery options for some failure modes when Draupnir
# fails to start. For example, if the bot fails to resolve a room alias in
# a watched list, or if the server has parted from a protected room and can't
# find a way back in. Safe mode will provide different options to recover from
# these. Such as unprotecting the room or unwatching the policy list.
# By default Draupnir will boot into safe mode only when the failure mode
# is recoverable.
# It may be desirable to prevent the bot from starting into safe mode if you have
# a pager system when Draupnir is down, as Draupnir could prevent your monitoring
# system from identifying a failure to start.
#safeMode:
# # The option for entering safe mode when Draupnir fails to start up.
# # - "RecoveryOnly" will only start the bot in safe mode when there are recovery options available. This is the default.
# # - "Never" will never start the bot in safe mode when Draupnir fails to start normally.
# # - "Always" will always start the bot in safe mode when Draupnir fails to start normally.
# bootOption: RecoveryOnly

View File

@ -1,4 +1,5 @@
SPDX-FileCopyrightText: 2024 MDAD project contributors
SPDX-FileCopyrightText: 2024 Catalan Lover <catalanlover@protonmail.com>
SPDX-FileCopyrightText: 2024 Slavi Pantaleev
SPDX-License-Identifier: AGPL-3.0-or-later