matrix-bridge-whatsapp/rootfs/etc/confd/templates/config.yaml.tmpl

85 lines
3.3 KiB
Cheetah
Raw Normal View History

2018-11-27 12:12:34 +00:00
# Homeserver details.
homeserver:
# The address that this appservice can use to connect to the homeserver.
address: "{{ getenv "SERVER_URL" }}"
# The domain of the homeserver (for MXIDs, etc).
domain: "{{ getenv "SERVER_DOMAIN" }}"
# Application service host/registration related details.
# Changing these values requires regeneration of the registration.
appservice:
# The address that the homeserver can use to connect to this appservice.
address: http://{{getenv "HOSTNAME"}}:8080
# The hostname and port where this appservice should listen.
hostname: 0.0.0.0
port: 8080
# Database config.
database:
# The database type. Only "sqlite3" is supported.
2019-03-27 17:33:54 +00:00
type: postgres
2018-11-27 12:12:34 +00:00
# The database URI. Usually file name. https://github.com/mattn/go-sqlite3#connection-string
2019-03-27 17:38:25 +00:00
uri: {{ getenv "DATABASE_DATASOURCE" }}
2018-11-27 12:12:34 +00:00
# Path to the Matrix room state store.
state_store_path: /var/lib/matrix-bridge/data/mx-state.json
# The unique ID of this appservice.
id: whatsapp
# Appservice bot details.
bot:
# Username of the appservice bot.
username: _whatsapp_bot
# Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
# to leave display name/avatar as-is.
displayname: WhatsApp Bridge Bot
avatar: mxc://maunium.net/NeXNQarUbrlYBiPCpprYsRqr
# Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
2018-11-27 12:39:11 +00:00
as_token: "{{ getenv "AS_TOKEN" }}"
2018-11-27 14:22:37 +00:00
hs_token: "{{ getenv "HS_TOKEN" }}"
2018-11-27 12:12:34 +00:00
# Bridge config. Currently unused.
bridge:
# Localpart template of MXIDs for WhatsApp users.
# {{.}} is replaced with the phone number of the WhatsApp user.
2019-01-06 18:02:35 +00:00
username_template: whatsapp_{{"{{"}}.{{"}}"}}
2018-11-27 12:12:34 +00:00
# Displayname template for WhatsApp users.
# {{.Notify}} - nickname set by the WhatsApp user
# {{.Jid}} - phone number (international format)
# The following variables are also available, but will cause problems on multi-user instances:
# {{.Name}} - display name from contact list
# {{.Short}} - short display name from contact list
2018-11-27 14:22:37 +00:00
displayname_template: "{{"{{"}}if .Notify{{"}}"}}{{"{{"}}.Notify{{"}}"}}{{"{{"}}else{{"}}"}}{{"{{"}}.Jid{{"}}"}}{{"{{"}}end{{"}}"}} (WA)"
2018-11-27 12:12:34 +00:00
# The prefix for commands. Only required in non-management rooms.
command_prefix: "!wa"
# Permissions for using the bridge.
# Permitted values:
# user - Access to use the bridge to chat with a WhatsApp account.
# admin - User level and some additional administration tools
# Permitted keys:
# * - All Matrix users
# domain - All users on that homeserver
# mxid - Specific user
permissions:
"{{ getenv "SERVER_DOMAIN" }}": user
"{{ getenv "ADMIN_USER" }}": admin
# Logging config.
logging:
# The directory for log files. Will be created if not found.
directory: /var/lib/matrix-bridge/logs
# Available variables: .Date for the file date and .Index for different log files on the same day.
2018-11-27 14:22:37 +00:00
file_name_format: "{{"{{"}}.Date{{"}}"}}-{{"{{"}}.Index{{"}}"}}.log"
2018-11-27 12:12:34 +00:00
# Date format for file names in the Go time format: https://golang.org/pkg/time/#pkg-constants
file_date_format: 2006-01-02
# Log file permissions.
file_mode: 0600
# Timestamp format for log entries in the Go time format.
timestamp_format: Jan _2, 2006 15:04:05
# Minimum severity for log messages.
# Options: debug, info, warn, error, fatal
2019-01-07 13:03:44 +00:00
print_level: debug