Sign inSign up

swimminghao/ttrss

By swimminghao

Updated 9 months ago

Image
0

252

swimminghao/ttrss repository overview

version: "3"
services:
  service.rss:
    image: wangqiru/ttrss:latest
    container_name: ttrss
    ports:
      - 8002:80
    environment:
      - SELF_URL_PATH=http://www.swimminghao.top:8002/ # please change to your own domain
      - DB_PASS=ttrss # use the same password defined in `database.postgres`
      - PUID=1000
      - PGID=1000
      - ALLOW_PORTS=8020
      - ENABLE_PURGE_OLD_ARTICLES=true     # 启用自动清理任务
      - PURGE_OLD_ARTICLES_INTERVAL=24     # 清理检查间隔(小时)
      - PURGE_UNREAD_ARTICLES_DAYS=30      # 自动标记为已读的天数(可选)
      - DAEMON_SLEEP_INTERVAL=600
      #- HTTP_PROXY=http://172.29.842.5:7890
      #- HTTPS_PROXY=http://172.29.84.5:7890
      #- http_proxy=http://172.29.84.5:7890
      #- https_proxy=http://172.29.84.5:7890
    volumes:
      - ./feed-icons:/var/www/feed-icons/
      - ./plugins:/var/www/plugins/
    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:
     ipam:
       config:
       - subnet: 172.29.32.0/24 # 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


强制更新

docker exec -u nobody ttrss php /var/www/update.php --debug-feed 1154

释放磁盘空间

进入 PostgreSQL 容器:
docker exec -it postgres /bin/bash
连接到数据库(密码为 docker-compose.yml 中设置的 ttrss):
psql -U postgres -d ttrss
执行 VACUUM FULL 并分析:
-- 执行完全清理,这会锁定表,期间TTRSS将暂时无法访问
VACUUM FULL VERBOSE;
-- 完成后,更新统计信息
ANALYZE VERBOSE;
输入 \q 退出 psql,再输入 exit 退出容器。

Tag summary

Content type

Image

Digest

sha256:3385b3342

Size

69.7 MB

Last updated

9 months ago

docker pull swimminghao/ttrss