Skip to content

Commit db7c4ba

Browse files
committed
feat: add ntfy
1 parent b785a87 commit db7c4ba

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

stacks/ntfy.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# DOMAIN=example.com docker stack deploy -c ntfy.yml ntfy
2+
3+
version: '3.8'
4+
5+
services:
6+
web:
7+
image: binwiederhier/ntfy:${VERSION:-v2.4.0}
8+
entrypoint: /bin/sh
9+
command:
10+
- -c
11+
- |
12+
touch /var/lib/ntfy/user.db
13+
echo 'auth-file: "/var/lib/ntfy/user.db"' > /etc/ntfy/server.yml
14+
echo 'auth-default-access: "deny-all"' >> /etc/ntfy/server.yml
15+
ntfy user add --role=admin $${ADMIN_USERNAME}
16+
ntfy serve
17+
environment:
18+
- ADMIN_USERNAME=${ADMIN_USERNAME:-admin}
19+
- NTFY_PASSWORD=${ADMIN_PASSWORD:-myp@ssw0rd}
20+
volumes:
21+
- ${VOLUME_PATH}config:/etc/ntfy
22+
- ${VOLUME_PATH}data:/var/lib/ntfy
23+
- ${VOLUME_PATH}cache:/var/cache/ntfy
24+
deploy:
25+
labels:
26+
- traefik.enable=true
27+
- traefik.http.routers.ntfy-${NUMBER:-1}.rule=Host(`${DOMAIN:-ntfy.localhost}`)
28+
- traefik.http.routers.ntfy-${NUMBER:-1}.entrypoints=${SCHEME:-https}
29+
- traefik.http.routers.ntfy-${NUMBER:-1}.service=ntfy-${NUMBER:-1}
30+
- traefik.http.routers.ntfy-${NUMBER:-1}.tls.certresolver=letsencrypt
31+
- traefik.http.services.ntfy-${NUMBER:-1}.loadbalancer.server.port=80
32+
33+
volumes:
34+
config:
35+
cache:
36+
data:
37+
38+
networks:
39+
default:
40+
external: true
41+
name: traefik-net

templates.json

+15
Original file line numberDiff line numberDiff line change
@@ -1718,6 +1718,21 @@
17181718
"url": "https://github.com/ethibox/awesome-stacks",
17191719
"stackfile": "stacks/focalboard.yml"
17201720
}
1721+
},
1722+
{
1723+
"type": 2,
1724+
"title": "Ntfy",
1725+
"description": "Alternative open-source à Pushbullet",
1726+
"categories": ["Notifications"],
1727+
"enabled": false,
1728+
"trial": 7,
1729+
"price": 19,
1730+
"logo": "https://i.imgur.com/xklY3FN.png",
1731+
"website": "https://ntfy.sh/",
1732+
"repository": {
1733+
"url": "https://github.com/ethibox/awesome-stacks",
1734+
"stackfile": "stacks/ntfy.yml"
1735+
}
17211736
}
17221737
]
17231738
}

0 commit comments

Comments
 (0)