[新服务] docker-compose talebook ebook reader online

date
Feb 16, 2023
slug
newservice-talebook-web-ebook-reader
status
Published
summary
新服务 电子书阅读 自建服务
tags
service
type
Post
URL
notion image

Summary

步骤

#1

export DOCKER_PROJ=talebook
mkdir /data/$DOCKER_PROJ; cd /data/$DOCKER_PROJ

ln -s /drive/qh13_webdav_remote/book/calibre_central ./qh13-book

cat > docker-compose.yml <<EOF
version: "2.4"

services:
  # main service
  talebook:
    restart: always
    image: talebook/talebook
    container_name: talebook
    volumes:
      # - ./qh13-book:/data
      - /volume1/book:/data
    ports:
      - "56080:80"
      #- "56443:443"
    depends_on:
      - douban-rs-api

  # optional, for meta plugins
  # please set "http://douban-rs-api" in settings
  douban-rs-api:
    restart: always
    container_name: douban-rs-api
    image: ghcr.io/cxfksword/douban-api-rs
    #ports:
    #  - "8282:80" 作者:我怕黑Leo https://www.bilibili.com/read/cv21967912?spm_id_from=333.999.0.0 出处:bilibili
networks:
  npm_nginx_proxy_manager-network:
    external: true
EOF

docker-compose down; docker-compose up -d; sleep 1s; docker-compose logs -f


docker-compose pull
docker-compose up -d    # 请不要使用docker-compose stop来停止容器,因为这么做需要额外的时间等待容器停止;docker-compose up -d直接升级容器时会自动停止并立刻重建新的容器,完全没有必要浪费那些时间。
docker image prune  # prune 命令用来删除不再使用的 docker 对象。删除所有未被 tag 标记和未被容器使用的镜像
 

#2批量加入和删除书籍

notion image
notion image
 

#3 设置豆瓣信息

notion image
 

#4 reverse proxy - (maybe optional)

location / {
      proxy_pass http://talebook:80;
      rewrite ^/(.*)$ /$1 break;
      proxy_redirect off;
      proxy_set_header Host $host;
      proxy_set_header X-Forwarded-Proto $scheme;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Upgrade-Insecure-Requests 1;
      proxy_set_header X-Forwarded-Proto https;
    }

© Ying Bun 2021 - 2024