default matrix message pipe

This commit is contained in:
olli 2024-08-18 16:30:58 +02:00
parent 3978e8c71b
commit 601f89bcbf

View File

@ -88,6 +88,12 @@
backup: yes backup: yes
notify: Restart matrix notify: Restart matrix
- name: Create Matrix Group
ansible.builtin.group:
name: matrix
state: present
gid: 1007
- name: /home/docker/matrix.{{inventory_hostname}}/genpw.sh (generate Random PW for Matrix and DB) - name: /home/docker/matrix.{{inventory_hostname}}/genpw.sh (generate Random PW for Matrix and DB)
blockinfile: blockinfile:
path: /home/docker/matrix.{{inventory_hostname}}/genpw.sh path: /home/docker/matrix.{{inventory_hostname}}/genpw.sh
@ -140,6 +146,11 @@
cp_max: 10 cp_max: 10
" >>data/homeserver.yaml " >>data/homeserver.yaml
fi fi
# fifo pipe for messages to default room
mkfifo /usr/local/share/$(hostname).fifo
chgrp matrix /usr/local/share/$(hostname).fifo
chmod 660 matrix /usr/local/share/$(hostname).fifo
backup: yes backup: yes
validate: /bin/bash -n %s validate: /bin/bash -n %s
notify: run genpw.sh notify: run genpw.sh
@ -428,6 +439,14 @@
- ./matrix-commander-data:/data:rw - ./matrix-commander-data:/data:rw
restart: no restart: no
matrix.defiant.dedyn.io--commander-pipe:
image: matrixcommander/matrix-commander
volumes:
- /etc/localtime:/etc/localtime:ro
- ./matrix-commander-data:/data:rw
- /usr/local/share/{{inventory_hostname}}.fifo:/{{inventory_hostname}}.fifo
entrypoint: /bin/bash -c 'cd /data && tail -F /{{inventory_hostname}}.fifo | /app/matrix_commander/matrix-commander --html -m _ -k --room {{inventory_hostname}} --log-level INFO INFO'
restart: unless-stopped
networks: networks:
matrix.{{inventory_hostname}}--network: matrix.{{inventory_hostname}}--network: