乐趣区

关于python:写在2020年搭建ttrss的步骤避免非80433端口无法订阅

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


参考文章

退出移动版