add ntfy compose

This commit is contained in:
Michi 2025-03-01 20:05:23 +01:00 committed by GitHub
parent a18c228bd8
commit 936402c25b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

31
ntfy/docker-compose.yml Normal file
View file

@ -0,0 +1,31 @@
services:
ntfy:
image: binwiederhier/ntfy
container_name: ntfy
command:
- serve
environment:
- TZ=Europe/Zurich
- NTFY_BASE_URL=https://ntfy.example.com
- NTFY_CACHE_FILE=/var/lib/ntfy/cache.db
- NTFY_AUTH_FILE=/var/lib/ntfy/auth.db
- NTFY_AUTH_DEFAULT_ACCESS=deny-all
- NTFY_BEHIND_PROXY=true
- NTFY_ATTACHMENT_CACHE_DIR=/var/lib/ntfy/attachments
- NTFY_ENABLE_LOGIN=true
- NTFY_UPSTREAM_BASE_URL=https://ntfy.sh
# Connect to container: docker exec -it ntfy sh
# Add admin user: ntfy user add --role=admin <USERNAME>
# Add normal user: ntfy user add <USERNAME>
# Add permission for topic: ntfy access <USERNAME> <TOPIC> <Permission: ro/rw>
# List access tokens: ntfy token list <USERNAME>
# Create new access token: ntfy token add <USERNAME>
# Docs: https://docs.ntfy.sh/config/#users-and-roles
user: 0:0
volumes:
- ./cache:/var/cache/ntfy
- ./config:/etc/ntfy
- ./db:/var/lib/ntfy/
ports:
- 80:80
restart: unless-stopped