Skip to content

Commit 560ebd0

Browse files
committed
Make /tmp for maubot writable
1 parent d1c7f7e commit 560ebd0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

roles/custom/matrix-bot-maubot/templates/systemd/matrix-bot-maubot.service.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Environment="HOME={{ devture_systemd_docker_base_systemd_unit_home_path }}"
1616
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} stop --time={{ devture_systemd_docker_base_container_stop_grace_time_seconds }} matrix-bot-maubot 2>/dev/null || true'
1717
ExecStartPre=-{{ devture_systemd_docker_base_host_command_sh }} -c '{{ devture_systemd_docker_base_host_command_docker }} rm matrix-bot-maubot 2>/dev/null || true'
1818

19+
{#
20+
We mount a tmpfs at /tmp, because some maubot plugins may wish to write to it.
21+
It makes sense to provide at least some sort of temporary storage.
22+
#}
1923
ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
2024
--rm \
2125
--name=matrix-bot-maubot \
@@ -25,6 +29,7 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
2529
--cap-drop=ALL \
2630
--mount type=bind,src={{ matrix_bot_maubot_config_path }},dst=/config,ro \
2731
--mount type=bind,src={{ matrix_bot_maubot_data_path }},dst=/data \
32+
--tmpfs=/tmp:rw,noexec,nosuid,size=1024m \
2833
--label-file={{ matrix_bot_maubot_base_path }}/labels \
2934
{% for arg in matrix_bot_maubot_container_extra_arguments %}
3035
{{ arg }} \

0 commit comments

Comments
 (0)