mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-11-10 12:47:39 +01:00
matrix-ntfy: persist cache on disk
This commit is contained in:
parent
763586e878
commit
3866fff5a8
@ -1,4 +1,3 @@
|
||||
# TODO
|
||||
|
||||
- Mount the ntfy database to disk so subscriptions persist across restarts.
|
||||
- Authentication?
|
||||
|
@ -2,6 +2,7 @@
|
||||
matrix_ntfy_enabled: true
|
||||
|
||||
matrix_ntfy_base_path: "{{ matrix_base_data_path }}/ntfy"
|
||||
matrix_ntfy_data_path: "{{ matrix_ntfy_base_path }}/data"
|
||||
|
||||
matrix_ntfy_version: v1.27.2
|
||||
matrix_ntfy_docker_image: "{{ matrix_container_global_registry_prefix }}binwiederhier/ntfy:{{ matrix_ntfy_version }}"
|
||||
|
@ -15,6 +15,17 @@
|
||||
delay: "{{ matrix_container_retries_delay }}"
|
||||
until: result is not failed
|
||||
|
||||
- name: Ensure matrix-ntfy paths exists
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
owner: "{{ matrix_user_username }}"
|
||||
group: "{{ matrix_user_groupname }}"
|
||||
with_items:
|
||||
- "{{ matrix_ntfy_base_path }}"
|
||||
- "{{ matrix_ntfy_data_path }}"
|
||||
|
||||
- name: Ensure matrix-ntfy.service installed
|
||||
template:
|
||||
src: "{{ role_path }}/templates/systemd/matrix-ntfy.service.j2"
|
||||
|
@ -23,6 +23,8 @@ ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-ntfy \
|
||||
{% if matrix_ntfy_container_http_host_bind_port %}
|
||||
-p {{ matrix_ntfy_container_http_host_bind_port }}:80 \
|
||||
{% endif %}
|
||||
--mount type=bind,src={{ matrix_ntfy_data_path }},dst=/data \
|
||||
--env NTFY_CACHE_FILE=/data/cache.db \
|
||||
--env NTFY_BASE_URL=https://{{ matrix_server_fqn_ntfy }} \
|
||||
{{ matrix_ntfy_docker_image }} \
|
||||
serve --behind-proxy
|
||||
|
Loading…
Reference in New Issue
Block a user