Add support for matrix-reminder-bot
This commit is contained in:
@ -0,0 +1,50 @@
|
||||
# The string to prefix bot commands with
|
||||
command_prefix: "!"
|
||||
|
||||
# Options for connecting to the bot's Matrix account
|
||||
matrix:
|
||||
# The Matrix User ID of the bot account
|
||||
user_id: {{ matrix_bot_matrix_reminder_bot_matrix_user_id|to_json }}
|
||||
# Matrix account password
|
||||
user_password: {{ matrix_bot_matrix_reminder_bot_matrix_user_password|to_json }}
|
||||
# The public URL at which the homeserver's Client-Server API can be accessed
|
||||
homeserver_url: {{ matrix_bot_matrix_reminder_bot_matrix_homeserver_url }}
|
||||
# The device ID that is a **non pre-existing** device
|
||||
# If this device ID already exists, messages will be dropped silently in
|
||||
# encrypted rooms
|
||||
device_id: REMINDER
|
||||
# What to name the logged in device
|
||||
device_name: Reminder Bot
|
||||
|
||||
storage:
|
||||
# The database connection string
|
||||
# For SQLite3, this would look like:
|
||||
# database: "sqlite://bot.db"
|
||||
# For Postgres, this would look like:
|
||||
# database: "postgres://username:password@localhost/dbname?sslmode=disable"
|
||||
#database: "postgres://matrix-reminder-bot:remindme@localhost/matrix-reminder-bot?sslmode=disable"
|
||||
database: "sqlite:///data/bot.db"
|
||||
# The path to a directory for internal bot storage
|
||||
# containing encryption keys, sync tokens, etc.
|
||||
store_path: "/data/store"
|
||||
|
||||
reminders:
|
||||
# Uncomment to set a default timezone that will be used when creating reminders.
|
||||
# If not set, UTC will be used
|
||||
timezone: {{ matrix_bot_matrix_reminder_bot_reminders_timezone }}
|
||||
|
||||
# Logging setup
|
||||
logging:
|
||||
# Logging level
|
||||
# Allowed levels are 'INFO', 'WARNING', 'ERROR', 'DEBUG' where DEBUG is most verbose
|
||||
level: INFO
|
||||
# Configure logging to a file
|
||||
file_logging:
|
||||
# Whether logging to a file is enabled
|
||||
enabled: false
|
||||
# The path to the file to log to. May be relative or absolute
|
||||
filepath: /data/bot.log
|
||||
# Configure logging to the console (stdout/stderr)
|
||||
console_logging:
|
||||
# Whether console logging is enabled
|
||||
enabled: true
|
@ -0,0 +1,40 @@
|
||||
#jinja2: lstrip_blocks: "True"
|
||||
[Unit]
|
||||
Description=matrix-reminder-bot
|
||||
{% for service in matrix_bot_matrix_reminder_bot_systemd_required_services_list %}
|
||||
Requires={{ service }}
|
||||
After={{ service }}
|
||||
{% endfor %}
|
||||
{% for service in matrix_bot_matrix_reminder_bot_systemd_wanted_services_list %}
|
||||
Wants={{ service }}
|
||||
{% endfor %}
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStartPre=-{{ matrix_host_command_docker }} kill matrix-bot-matrix-reminder-bot
|
||||
ExecStartPre=-{{ matrix_host_command_docker }} rm matrix-bot-matrix-reminder-bot
|
||||
|
||||
ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-bot-matrix-reminder-bot \
|
||||
--log-driver=none \
|
||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
||||
--cap-drop=ALL \
|
||||
--read-only \
|
||||
--network={{ matrix_docker_network }} \
|
||||
-e 'TZ={{ matrix_bot_matrix_reminder_bot_reminders_timezone }}' \
|
||||
-v {{ matrix_bot_matrix_reminder_bot_config_path }}:/config:ro \
|
||||
-v {{ matrix_bot_matrix_reminder_bot_data_path }}:/data:rw \
|
||||
--entrypoint=/bin/sh \
|
||||
{% for arg in matrix_bot_matrix_reminder_bot_container_extra_arguments %}
|
||||
{{ arg }} \
|
||||
{% endfor %}
|
||||
{{ matrix_bot_matrix_reminder_bot_docker_image }} \
|
||||
-c "matrix-reminder-bot /config/config.yaml"
|
||||
|
||||
ExecStop=-{{ matrix_host_command_docker }} kill matrix-bot-matrix-reminder-bot
|
||||
ExecStop=-{{ matrix_host_command_docker }} rm matrix-bot-matrix-reminder-bot
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
SyslogIdentifier=matrix-bot-matrix-reminder-bot
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user