feat(ntfy): 添加ntfy服务配置及代理设置

- 新增ntfy server配置文件,设置默认访问权限和web认证
- 在caddy配置中添加ntfy子域名代理
- 更新ntfy stack配置,禁用用户注册功能
This commit is contained in:
2025-08-31 22:51:44 +08:00
parent b8f5f150ae
commit 326f98249c
3 changed files with 19 additions and 1 deletions

4
ntfy/etc/ntfy/server,yml Normal file
View File

@@ -0,0 +1,4 @@
auth-default-access: "deny-all"
auth:
web: true

View File

@@ -1,6 +1,7 @@
# mkdir -pv /data/volumes/ntfy/lib
# pull:: docker compose -p ntfy --env-file ./ntfy/env.cfg -f ./ntfy/stack.yml pull
# run:: docker compose -p ntfy --env-file ./ntfy/env.cfg -f ./ntfy/stack.yml up -d
# 部署好后: docker exec -it ntfy ntfy user add --role=admin <username> 设置登录账号和密码
services:
ntfy:
@@ -26,6 +27,7 @@ services:
- NTFY_WEB_PUSH_PRIVATE_KEY= <private_key>
- NTFY_WEB_PUSH_FILE=/var/lib/ntfy/webpush.db #设置web推送数据文件
- NTFY_WEB_PUSH_EMAIL_ADDRESS= <email>
- NTFY_ENABLE_SIGNUP=false
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro