介绍与源码请看原项目:rss-reader
在原项目( 23 年 9 月版本)基础上(我修改的):
准备:服务器安装好 docker
开始: 一、 创建文件夹,如“rrx”
mkdir rrx
二、进入文件夹
cd rrx/
三、创建文件:config.json ("values"改成自己的 rss 地址,“listHeight”控制列表高度,源多可以试试 300 )
{
"values": [
"https://linux.do/latest.rss",
"https://www.v2ex.com/feed/vps.xml"
],
"refresh": 6,
"autoUpdatePush": 7,
"listHeight": "600",
"webTitle": "Hello",
"webDes":"My station"
}
四、创建文件:docker-compose.yml
version: "3"
services:
server:
image: topang/rss-reader-mix:latest
container_name: rss-reader-mix
restart: always
ports:
- "8880:8080"
volumes:
- "$PWD/config.json:/app/config.json"
五、启动!
docker-compose up -d
访问 8880 端口( ip:8880 )
六、添加反代( Nginx 配置文件添加在 server{...}里面)
location ^~ /{
proxy_pass http://127.0.0.1:8880;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
# proxy_hide_header Upgrade;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
set $static_fileHXsgUAWW 0;
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
{
set $static_fileHXsgUAWW 1;
expires 1m;
}
if ( $static_fileHXsgUAWW = 0 )
{
add_header Cache-Control no-cache;
}
}
搭好:DEMO
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.