• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

写在2020年,搭建tt-rss的步骤(避免非80,433端口无法订阅)

互联网 diligentman 1周前 (11-22) 9次浏览

1. 复制如下yml文件, 保存为docker-compose.yml只需注意下面四处有中文注释的地方

version: "3"
services:
  service.rss:
    image: wangqiru/ttrss:latest
    container_name: ttrss
    ports:
      - 8280:80
    environment:
      - SELF_URL_PATH=http://x.x.x.x:8280/ # x.x.x.x改成自己域名的ip
      - DB_PASS=xxxxx # 修改为下面自定义的postgres密码
      - PUID=1000
      - PGID=1000
      - ALLOW_PORTS=1200,3000  # 加入这个配置,才能访问rsshub和huginn默认的1200,3000端口
    volumes:
      - feed-icons:/var/www/feed-icons/
    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=xxxxx  # 自定义postgres密码
    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. 将docker-compose.yml上传到自己的服务器

3. 执行 docker-compose up -d命令,等待命令执行完成.

4. 访问http://x.x.x.x.8280/即可, 默认账户 admin ,password


参考文章


喜欢 (0)