标签 gotify 下的文章 - 晓暮部落格
首页
推荐
说说
Memos
留言板
站点统计
友链申请
关于本站
Search
1
Gotify-个人消息推送服务
32 阅读
2
使用gotify发送图片
28 阅读
3
Memos更新0.23.0
21 阅读
4
memos的第三方评论--twikoo
18 阅读
5
Docker部署Memos(0.22.5+mysql)
13 阅读
碎碎念
生物技术
生活
服务器
关于本站
登录
找到
2
篇与
相关的结果
2024-12-09
使用gotify发送图片
Gotify发送图片消息 gotify默认推送为纯文本消息,如果需要发送图片消息,需要使用markdown语法,发送信息格式为json 下列为python实现发送图片示例,请将notify_url和token=后面的值替换为你的gotify服务url和真实tokenimport requests resp = requests.post('notify_url/message?token=12345678', json={ "message": "![](https://pic.lishihao.top:99/i/12/6764d790547dc.webp)", "priority": 2, "title": "图片", "extras": { "client::display": { "contentType": "text/markdown" } } }) print(resp)推送到手机的效果如下图 1734662062002.webp图片 其他代码发送图片见官方示例 gotify部署方式见本站文章Gotify-个人消息推送服务
服务器
docker服务
# gotify
晓暮
1年前
0
28
4
2024-11-04
Gotify-个人消息推送服务
Gotify简介 Gotify官方地址gotify 图片 该项目是一个开源免费项目,用于个人消息推送,例如IP地址变动,监控任务消息,定期消息推送等,可以替代邮件服务器给自己移动端发送消息(也支持网页端推送,这取决于浏览器是否能及时推送) 部署方式采用docker-compose方式 1、新建文件目录后,创建docker-compose.yml文件,粘贴一下内容 version: '3.3' services: gotify: image: gotify/server container_name: Gotify ports: - "80:80" # 冒号前面端口不冲突即可 volumes: - ./data:/app/data:rw # 冒号前面映射gotify文件夹路径 environment: - GOTIFY_DEFAULTUSER_NAME=admin # 自定义管理员账号 - GOTIFY_DEFAULTUSER_PASS=adminpasswd # 自定义管理员密码 - TZ=Asia/Shanghai2、启动容器 sudo docker-compose up -d,然后访问对应端口即可 3、增加nginx代理,以使用ssl加密,(注意:需要修改域名和证书信息,以及你自己在docker-compose文件中的端口)参考如下 server { listen 80; server_name gotify.域名; # Redirect all HTTP requests to HTTPS rewrite ^(.*)$ https://$host$1 permanent; } server { listen 443 ssl; server_name gotify.域名; ssl_certificate /证书; ssl_certificate_key /证书秘钥; ssl_protocols TLSv1.2 TLSv1.3; ssl_prefer_server_ciphers on; location / { # We set up the reverse proxy proxy_pass http://127.0.0.1:80; proxy_http_version 1.1; # Ensuring it can use websockets proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto http; proxy_redirect http:// $scheme://; # The proxy must preserve the host because gotify verifies the host with the origin # for WebSocket connections proxy_set_header Host $http_host; # These sets the timeout so that the websocket can stay alive proxy_connect_timeout 1m; proxy_send_timeout 1m; proxy_read_timeout 1m; } }4、通过nginx代理的域名访问,按照docker-compose中设置的管理员账户和密码进入设置和使用 5、下载手机客户端,添加对应配置信息即可(主要是服务链接和token,token需要先在网页端增加app获取,后续根据token进行推送) 6、举个例子,我有一个DDNS-go服务,支持gotify推送;在url位置填入gotify服务地址+/message?token=具体的app token;按照ddns-go格式填入消息推送格式内容,点击测试手机端即可收到推送 图片 手机端推送 图片 图片发送见本站文章使用gotify发送图片
docker服务
# gotify
晓暮
1年前
1
32
0
易航博客