31 lines
840 B
YAML
31 lines
840 B
YAML
---
|
|
- name: Create folder structure
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
with_items:
|
|
- "{{ data_dir }}/ntfy"
|
|
- "{{ data_dir }}/ntfy/cache"
|
|
- "{{ data_dir }}/ntfy/data"
|
|
|
|
- name: Create Ntfy Docker Container
|
|
docker_container:
|
|
name: ntfy
|
|
image: binwiederhier/ntfy
|
|
command: serve
|
|
restart_policy: unless-stopped
|
|
recreate: true
|
|
networks:
|
|
- name: homelab
|
|
volumes:
|
|
- "{{ data_dir }}/ntfy/cache:/var/cache/ntfy"
|
|
- "{{ data_dir }}/ntfy/data:/etc/ntfy"
|
|
env:
|
|
UPSTREAM_BASE_URL: "{{ NTFY_UPSTREAM_BASE_URL }}"
|
|
BASE_URL: "{{ NTFY_BASE_URL }}"
|
|
labels:
|
|
traefik.enable: "true"
|
|
traefik.http.routers.ntfy.rule: Host(`push.fntz.net`)
|
|
traefik.http.routers.ntfy.entrypoints: webSecure
|
|
traefik.http.routers.ntfy.tls.certresolver: letsencrypt
|