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