mirror of
https://github.com/michivonah/docker.git
synced 2025-12-22 20:36:27 +01:00
31 lines
1 KiB
YAML
31 lines
1 KiB
YAML
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
|