自托管提醒平台Noted Reminders

什么是 Noted Reminders ?

Noted 是一个简单的自托管应用程序,用于创建使用 Apprise API 推送到设备的提醒。您可以向几乎每个平台发送消息,包括定时电子邮件!

什么是 Apprise API ?

Apprise 允许您向我们今天可用的几乎所有最流行的通知服务发送通知,例如:TelegramDiscordSlackAmazon SNSGotify 等。此 API 提供了一个简单的网关,可以通过 HTTP 接口直接访问它。

Apprise 是老外开发的,所以支持的都是国外主流的 通信软件 和短信,微信肯定是不支持的

老苏之前写过 Apprise,当时选择的是邮件,但邮件的实时性太差了

文章传送门:几乎每个平台都可以使用的推送通知apprise

不过现在多了一个选择,就是 Gotify

文章传送门:Gotify消息推送系统搭建

安装

在群晖上以 Docker 方式安装。

在注册表中搜索 noted ,选择第二个 mrcas/noted,版本选择 latest

本文写作时, latest 版本对应为 v1.0.0,最新的 v1.1.0 测试也是 OK 的;

自托管提醒平台Noted Reminders_第1张图片

端口

本地端口不冲突就行,不确定的话可以用命令查一下

# 查看端口占用
netstat -tunlp | grep 端口号
本地端口 容器端口
8388 8080

默认没有暴露端口

自托管提醒平台Noted Reminders_第2张图片

需要点 + 号添加

自托管提醒平台Noted Reminders_第3张图片

环境

可变
TZ 设为 Asia/Shanghai

自托管提醒平台Noted Reminders_第4张图片

命令行安装

如果你熟悉命令行,可能用 docker cli 更快捷

# 运行容器
docker run -d \
   --restart unless-stopped \
   --name noted \
   -p 8388:8080 \
   -e TZ=Asia/Shanghai \
   mrcas/noted:latest

也可以用 docker-compose 安装,将下面的内容保存为 docker-compose.yml 文件

version: '3'

services:
  noted:
    image: mrcas/noted:latest
    container_name: noted
    restart: unless-stopped
    ports:
      - 8388:8080
    environment:  
      - TZ=Asia/Shanghai  

然后执行下面的命令

# 新建文件夹 noted
mkdir -p /volume2/docker/noted

# 进入 noted 目录
cd /volume2/docker/noted

# 将 docker-compose.yml 放入当前目录

# 一键启动
docker-compose up -d

从资源库,CPU 占用比较高

在这里插入图片描述

运行

在浏览器中输入 http://群晖IP:8388 就能看到登录界面

自托管提醒平台Noted Reminders_第5张图片

先要创建一个用户

自托管提醒平台Noted Reminders_第6张图片

登录成功之后的主界面\

自托管提醒平台Noted Reminders_第7张图片

但是现在还不能直接添加提醒,因为提醒依赖于 Apprise,而 Apprise 又依赖于 Gotify

获取 Gotify 的 token

打开 http://192.168.0.197:8385 ,登录 Gotify进入后台,选择 apps 后,能获取到 Token

自托管提醒平台Noted Reminders_第8张图片

设置 Apprise

这一步并不是必须的, 如果需要 Apprise 转发才需要安装

在 https://github.com/caronc/apprise#productivity-based-notifications 能查到 Gotify 的消息格式

打开 http://192.168.0.197:8181,在 Configuration Manager --> Configuration 中填入 gotify://192.168.0.197:8385/AdxxxxxxxxxxxPA,然后保存即可

自托管提醒平台Noted Reminders_第9张图片

如果需要 Apprise 转发,需要将协议改为 apprise,即 apprise://192.168.0.197:8181/apprise

自托管提醒平台Noted Reminders_第10张图片

进入 Notifications,做个简单测试

自托管提醒平台Noted Reminders_第11张图片

如果在 Gotify 很快就收到,说明设置是 OK

自托管提醒平台Noted Reminders_第12张图片

Noted Reminders 设置

现在回到 Noted Reminders,首先要添加 Notification Services

自托管提醒平台Noted Reminders_第13张图片

Apprise URL 中填入 gotify://192.168.0.197:8385/AdxxxxxxxxxxxPA

自托管提醒平台Noted Reminders_第14张图片

接下来新建提醒

自托管提醒平台Noted Reminders_第15张图片

虽然是英文界面,但是一看就懂

自托管提醒平台Noted Reminders_第16张图片

跟手机上设置定时提醒是差不多的

自托管提醒平台Noted Reminders_第17张图片

保存之后,会出现在主界面

自托管提醒平台Noted Reminders_第18张图片

Gotify 在设定的时间收到了消息

自托管提醒平台Noted Reminders_第19张图片

最后来张官方的图展示下效果

自托管提醒平台Noted Reminders_第20张图片

附录

数据库的备份

默认情况下,Noted.db 在容器的 /app 目录中,所以要备份的话需要执行下面的命令

# 进入 noted 目录
cd /volume2/docker/noted

# 将数据库文件拷贝到容器外当前目录
docker cp noted:/app/Noted.db ./

自托管提醒平台Noted Reminders_第21张图片

Apprise的安装

之前的文章中 Apprise是图形化安装的,如果你还没安装过,用命令行会更快捷

# 新建文件夹 apprise 和 子目录
mkdir -p /volume2/docker/apprise/config

# 进入 apprise 目录
cd /volume2/docker/apprise

# 修改目录权限
chmod 777 config

# 运行 apprise 容器
docker run -d \
   --restart unless-stopped \
   --name apprise \
   -p 8181:8000 \
   -v $(pwd)/config:/config \
   caronc/apprise:latest

参考文档

Casvt/Noted: A simple self hosted reminder platform that uses push to send notifications to your device. Set the reminder and forget about it!
地址:https://github.com/Casvt/Noted

你可能感兴趣的:(群晖,docker,消息推送)