version:"3" services: service.rss: image:wangqiru/ttrss:latest container_name:rss ports: -33334:80 environment: -SELF_URL_PATH=https://rss.litcu.cn/# please change to your own domain -DB_PASS=RSS2020# use the same password defined in `database.postgres` -PUID=1000 -PGID=1000 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=RSS2020# feel free to change the password volumes: -/home/docker/rss/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
然后创建好 /postgres/data 目录,使用 docker-compose up -d 来启动环境。
宝塔面板配置
利用宝塔面板新建一个网站,使用 PHP,然后添加 DNS 解析、申请 SSL 证书并部署,这部分省略。