rename ntfy stack to alerts

add apprise service to alerts stack
This commit is contained in:
Pim Kunis 2023-05-10 17:36:38 +02:00
parent 929ce2d382
commit 047ee4388b
4 changed files with 30 additions and 8 deletions

View file

@ -17,4 +17,4 @@
- {role: shephard, tags: shephard}
- {role: jitsi, tags: jitsi}
- {role: pihole, tags: pihole}
- {role: ntfy, tags: ntfy}
- {role: alerts, tags: alerts}

View file

@ -6,7 +6,7 @@ networks:
configs:
server:
file: /srv/ntfy/server.yml
file: /srv/alerts/ntfy_server.yml
services:
ntfy:
@ -46,3 +46,25 @@ services:
configs:
- source: server
target: /etc/ntfy/server.yml
apprise:
image: caronc/apprise:v0.9.0
networks:
- traefik
volumes:
- type: bind
source: /mnt/data/apprise
target: /config
deploy:
placement:
constraints:
- node.role == manager
labels:
- traefik.enable=true
- traefik.http.routers.apprise.entrypoints=localsecure
- traefik.http.routers.apprise.rule=Host(`apprise.pim.kunis.nl`)
- traefik.http.routers.apprise.tls=true
- traefik.http.routers.apprise.tls.certresolver=letsencrypt
- traefik.http.routers.apprise.service=apprise
- traefik.http.services.apprise.loadbalancer.server.port=8000
- traefik.docker.network=traefik

View file

@ -1,20 +1,20 @@
- name: Create working directory
file:
path: /srv/ntfy
path: /srv/alerts
state: directory
- name: Copy server config
copy:
src: "{{ role_path }}/server.yml"
dest: /srv/ntfy/server.yml
src: "{{ role_path }}/ntfy_server.yml"
dest: /srv/alerts/ntfy_server.yml
- name: Copy Docker stack file
template:
src: "{{ role_path }}/docker-stack.yml"
dest: /srv/ntfy/docker-stack.yml
dest: /srv/alerts/docker-stack.yml
- name: Deploy Docker stack
docker_stack:
name: ntfy
name: alerts
compose:
- /srv/ntfy/docker-stack.yml
- /srv/alerts/docker-stack.yml