From c2834d222611db86ef9b3c1e4725ac07da0f35a3 Mon Sep 17 00:00:00 2001 From: Lionstiger Date: Mon, 4 Mar 2019 15:42:22 +0100 Subject: [PATCH] running as matrix user from the start --- .../systemd/matrix-appservice-discord.service.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/matrix-synapse/templates/ext/appservice-discord/systemd/matrix-appservice-discord.service.j2 b/roles/matrix-synapse/templates/ext/appservice-discord/systemd/matrix-appservice-discord.service.j2 index 4d4b3f396..af91b1855 100644 --- a/roles/matrix-synapse/templates/ext/appservice-discord/systemd/matrix-appservice-discord.service.j2 +++ b/roles/matrix-synapse/templates/ext/appservice-discord/systemd/matrix-appservice-discord.service.j2 @@ -11,7 +11,8 @@ ExecStartPre=-/usr/bin/docker kill matrix-appservice-discord ExecStartPre=-/usr/bin/docker rm matrix-appservice-discord ExecStart=/usr/bin/docker run --rm --name matrix-appservice-discord \ --log-driver=none \ - -e "UID={{ matrix_user_uid }}" -e "GID={{ matrix_user_gid }}" \ + --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \ + --cap-drop=ALL \ --network={{ matrix_docker_network }} \ {% if matrix_appservice_discord_container_expose_client_server_api_port %} -p 127.0.0.1:9005:9005 \