Docker自建RSS阅读服务器

什么是RSS

RSS(英文全称:RDF Site Summary 或 Really Simple Syndication[2]),中文译作简易信息聚合[3],也称聚合内容[4],是一种消息来源格式规范,用以聚合多个网站更新的内容并自动通知网站订阅者。使用 RSS 后,网站订阅者便无需再手动查看网站是否有新的内容,同时 RSS 可将多个网站更新的内容进行整合,以摘要的形式呈现,有助于订阅者快速获取重要信息,并选择性地点阅查看。——引用自wikipedia

安装Docker和Docker-compose

教学地址

正式开始安装RSS阅读服务器—Awesome TTRSS(Tiny Tiny RSS的优化版)

下载HenryQW提供的docker-compose配置文件

mkdir /root/RSS
cd /root/RSS
wget https://github.com/HenryQW/Awesome-TTRSS/blob/main/docker-compose.yml

修改docker-compose配置文件

nano /root/RSS/docker-compose.yml

1.使用docker-compose提供的数据库

version: "3"
services:
  service.rss:
    image: wangqiru/ttrss:latest
    container_name: ttrss
    ports:
      - 181:80 #左边修改为你想要用于外部访问的端口
    environment:
      - SELF_URL_PATH=http://localhost:181/ # 你的RSS阅读服务域名地址(用IP+端口号也可以)
      - DB_PASS=ttrss # 数据库密码,自己用在线生成密码,生成一下。
      - PUID=1000
      - PGID=1000
    volumes:
      - feed-icons:/var/www/feed-icons/ #左边是宿主机目录位置,记得设置777权限
    networks:
      - public_access
      - service_only
      - database_only
    stdin_open: true
    tty: true
    restart: always

  service.mercury: # set Mercury Parser API endpoint to `service.mercury:3000` on TTRSS plugin setting page
    image: wangqiru/mercury-parser-api:latest
    container_name: mercury
    networks:
      - public_access
      - service_only
    restart: always

  service.opencc: # set OpenCC API endpoint to `service.opencc:3000` on TTRSS plugin setting page
    image: wangqiru/opencc-api-server:latest
    container_name: opencc
    environment:
      - NODE_ENV=production
    networks:
      - service_only
    restart: always

  database.postgres:
    image: postgres:13-alpine
    container_name: postgres
    environment:
      - POSTGRES_PASSWORD=ttrss # feel free to change the password
    volumes:
      - ~/postgres/data/:/var/lib/postgresql/data # persist postgres data to ~/postgres/data/ on the host
    networks:
      - database_only
    restart: always

  # utility.watchtower:
  #   container_name: watchtower
  #   image: containrrr/watchtower:latest
  #   volumes:
  #     - /var/run/docker.sock:/var/run/docker.sock
  #   environment:
  #     - WATCHTOWER_CLEANUP=true
  #     - WATCHTOWER_POLL_INTERVAL=86400
  #   restart: always

volumes:
  feed-icons:

networks:
  public_access: # Provide the access for ttrss UI
  service_only: # Provide the communication network between services only
    internal: true
  database_only: # Provide the communication between ttrss and database only
    internal: true

2.使用自己的数据库

version: "3"
services:
  service.rss:
    image: wangqiru/ttrss:latest
    container_name: ttrss
    ports:
      - 8880:80
    environment:
      - SELF_URL_PATH=https://rss.xxxx.xxxx/
      - PUID=1000
      - PGID=1000
      - DB_HOST=xxx.xxx.xxx.xxx
      - DB_PORT=5432
      - DB_NAME=rss
      - DB_USER=rss
      - DB_PASS=xxxxxx
    volumes:
      - ./feed-icons:/var/www/feed-icons/
    networks:
      - public_access
      - service_only
    stdin_open: true
    tty: true
    restart: always

  service.mercury:
    image: wangqiru/mercury-parser-api:latest
    container_name: mercury
    networks:
      - public_access
      - service_only
    restart: always

  service.opencc: 
    image: wangqiru/opencc-api-server:latest
    container_name: opencc
    environment:
      - NODE_ENV=production
    networks:
      - service_only
    restart: always
    
volumes:
  feed-icons:

networks:
  public_access: 
  service_only: 
    internal: true
docker-compose up -d

 

© 版权声明
THE END
喜欢就支持一下吧
点赞14 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容