services: service.rss: image:wangqiru/ttrss:latest container_name:ttrss labels: com.centurylinklabs.watchtower.enable:true environment: SELF_URL_PATH:http://机器ip:31480# please change to your own domain DB_PASS:ttrss# use the same password defined in `database.postgres` PUID:1026 PGID:100 ports: -31480:80 volumes: -feed-icons:/var/www/feed-icons/ networks: -public_access -service_only -database_only stdin_open:true tty:true depends_on: -service.mercury -service.opencc -database.postgres restart:always
service.mercury:# set Mercury Parser API endpoint to `service.mercury:3000` on TTRSS plugin setting page image:wangqiru/mercury-parser-api:latest labels: com.centurylinklabs.watchtower.enable:true 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 labels: com.centurylinklabs.watchtower.enable:true environment: NODE_ENV:production networks: -service_only restart:always
database.postgres: image:postgres:13-alpine labels: com.centurylinklabs.watchtower.enable:true 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 volumes: feed-icons: postgres-data:
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
注意,SELF_URL_PATH 处要填写你启动docker机器的ip,PUID和PGID是docker容器的用户id和组id,这个如果填错了好像也不会怎么样,只要你是用的创建的虚拟卷. 在命令行使用docker-compose up -d启动docker-compose容器.然后在浏览器中访问 http://机器ip:31480 就可以看到你的ttrss网站了.
services: service.rss: image:wangqiru/ttrss:latest container_name:ttrss labels: com.centurylinklabs.watchtower.enable:true environment: SELF_URL_PATH:http://机器ip:31480# please change to your own domain DB_PASS:ttrss# use the same password defined in `database.postgres` PUID:1026 PGID:100 ports: -31480:80 volumes: -feed-icons:/var/www/feed-icons/ networks: -public_access -service_only -database_only stdin_open:true tty:true depends_on: -rsshub -service.mercury -service.opencc -database.postgres restart:always
service.mercury:# set Mercury Parser API endpoint to `service.mercury:3000` on TTRSS plugin setting page image:wangqiru/mercury-parser-api:latest labels: com.centurylinklabs.watchtower.enable:true 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 labels: com.centurylinklabs.watchtower.enable:true environment: NODE_ENV:production networks: -service_only restart:always
database.postgres: image:postgres:13-alpine labels: com.centurylinklabs.watchtower.enable:true 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
volumes: feed-icons: redis-data: postgres-data:
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