forked from DevOps/deploy.stack
feat(ntfy): 添加ntfy服务配置及代理设置
- 新增ntfy server配置文件,设置默认访问权限和web认证 - 在caddy配置中添加ntfy子域名代理 - 更新ntfy stack配置,禁用用户注册功能
This commit is contained in:
4
ntfy/etc/ntfy/server,yml
Normal file
4
ntfy/etc/ntfy/server,yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
auth-default-access: "deny-all"
|
||||||
|
auth:
|
||||||
|
web: true
|
||||||
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
# mkdir -pv /data/volumes/ntfy/lib
|
# mkdir -pv /data/volumes/ntfy/lib
|
||||||
# pull:: docker compose -p ntfy --env-file ./ntfy/env.cfg -f ./ntfy/stack.yml pull
|
# 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
|
# 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:
|
services:
|
||||||
ntfy:
|
ntfy:
|
||||||
@@ -26,6 +27,7 @@ services:
|
|||||||
- NTFY_WEB_PUSH_PRIVATE_KEY= <private_key>
|
- NTFY_WEB_PUSH_PRIVATE_KEY= <private_key>
|
||||||
- NTFY_WEB_PUSH_FILE=/var/lib/ntfy/webpush.db #设置web推送数据文件
|
- NTFY_WEB_PUSH_FILE=/var/lib/ntfy/webpush.db #设置web推送数据文件
|
||||||
- NTFY_WEB_PUSH_EMAIL_ADDRESS= <email>
|
- NTFY_WEB_PUSH_EMAIL_ADDRESS= <email>
|
||||||
|
- NTFY_ENABLE_SIGNUP=false
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
|||||||
@@ -14,3 +14,15 @@ https://dom.48474.site {
|
|||||||
tls moqiruyi@gmail.com
|
tls moqiruyi@gmail.com
|
||||||
reverse_proxy 10.1.8.14:9800
|
reverse_proxy 10.1.8.14:9800
|
||||||
}
|
}
|
||||||
|
|
||||||
|
http://ntfy.48474.site {
|
||||||
|
tls moqiruyi@gmail.com
|
||||||
|
redir / /login temporary
|
||||||
|
# @httpget {
|
||||||
|
# protocol http
|
||||||
|
# method GET
|
||||||
|
# path_regexp ^/([-_a-z0-9]{0,64}$|docs/|static/)
|
||||||
|
# }
|
||||||
|
# redir @httpget https://{host}{uri}
|
||||||
|
reverse_proxy 10.1.8.14:9800
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user