docker-compose/ntfy/README.md

49 lines
889 B
Markdown
Raw Permalink Normal View History

2024-03-20 22:47:53 +01:00
# ntfy
2024-05-05 14:00:09 +02:00
- [ntfy](#ntfy)
- [Directory structure](#directory-structure)
- [Config](#config)
## Directory structure
```
/opt/docker/ntfy
.
├── docker-compose.yml
└── volumes
├── cache
└── ntfy
└── server.yml
```
2024-05-06 16:13:19 +02:00
2024-05-05 14:00:09 +02:00
## Config
2024-03-20 22:47:53 +01:00
```
2024-05-06 16:13:19 +02:00
# Start container
docker compose up -d && docker compose logs -f
# Move config file into ntfy directory
mv server.yml volumes/ntfy/
# Restart ntfy container
docker compose restart
# Access the container shell
docker compose exec -it ntfy sh
# Create a admin
ntfy user add --role=admin username
# Create a user and grant read / write access to topic
ntfy user add --role=user username
ntfy access username topic rw
# Create web push key pair
# required for background push notification with webapp
ntfy webpush keys
2024-05-05 14:00:09 +02:00
# Edit ntfy config
vi server.yml
2024-05-06 16:13:19 +02:00
# Restart ntfy container again
docker compose restart
```