From 326f98249cb3e6b19eb81c96fccdfd052a2bd5a3 Mon Sep 17 00:00:00 2001 From: cnphpbb Date: Sun, 31 Aug 2025 22:51:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(ntfy):=20=E6=B7=BB=E5=8A=A0ntfy=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E9=85=8D=E7=BD=AE=E5=8F=8A=E4=BB=A3=E7=90=86=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增ntfy server配置文件,设置默认访问权限和web认证 - 在caddy配置中添加ntfy子域名代理 - 更新ntfy stack配置,禁用用户注册功能 --- ntfy/etc/ntfy/server,yml | 4 ++++ ntfy/stack.yml | 2 ++ webout/configs/caddy/txc-proxy.conf | 14 +++++++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ntfy/etc/ntfy/server,yml diff --git a/ntfy/etc/ntfy/server,yml b/ntfy/etc/ntfy/server,yml new file mode 100644 index 0000000..700e4b3 --- /dev/null +++ b/ntfy/etc/ntfy/server,yml @@ -0,0 +1,4 @@ +auth-default-access: "deny-all" +auth: + web: true + diff --git a/ntfy/stack.yml b/ntfy/stack.yml index 8c610f1..8a0311b 100644 --- a/ntfy/stack.yml +++ b/ntfy/stack.yml @@ -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 设置登录账号和密码 services: ntfy: @@ -26,6 +27,7 @@ services: - NTFY_WEB_PUSH_PRIVATE_KEY= - NTFY_WEB_PUSH_FILE=/var/lib/ntfy/webpush.db #设置web推送数据文件 - NTFY_WEB_PUSH_EMAIL_ADDRESS= + - NTFY_ENABLE_SIGNUP=false volumes: - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro diff --git a/webout/configs/caddy/txc-proxy.conf b/webout/configs/caddy/txc-proxy.conf index b11be0c..5c8fdf7 100644 --- a/webout/configs/caddy/txc-proxy.conf +++ b/webout/configs/caddy/txc-proxy.conf @@ -13,4 +13,16 @@ https://www.48474.site { https://dom.48474.site { tls moqiruyi@gmail.com reverse_proxy 10.1.8.14:9800 -} \ No newline at end of file +} + +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 +}