komga容器部署
文章摘要
|
引用
komga github
A media server for your comics, mangas, BDs, magazines and eBooks
使用 Docker 运行
1 Registries
Docker 镜像发布于:
2 版本标签
此镜像提供多种版本,可以通过标签获取,建议使用latest以获取最新版本体验。
| 标签 | 说明 |
|---|---|
latest | 最新提交 |
MAJOR.x | 最新的MAJOR版本,例如0.x |
x.y.z | 版本x.y.z |
3 使用
这里有一些示例代码片段来帮助您开始创建一个容器(建议使用下面的docker-compose一键部署)。
docker create \
--name=komga \
--user 1000:1000 \
-p 25600:25600 \
--mount type=bind,source=/path/to/config,target=/config \
--mount type=bind,source=/path/to/data,target=/data \
--restart unless-stopped \
gotson/komga
然后启动容器:
docker start komga
3.1 docker compose
version: '3.8'
services:
komga:
image: ghcr.nju.edu.cn/gotson/komga:latest
container_name: komga
restart: unless-stopped
# ========== 网络(Traefik 发现) ==========
networks:
- traefik_public
# ========== 端口映射(内网 IP 直接访问) ==========
ports:
- "8800:25600" # http://群晖IP:8800 直接访问
# ========== 存储卷 ==========
volumes:
- /docker/komga/config:/config #使用自己的挂载路径
- /comic:/comic
# ========== 环境变量 ==========
environment:
- TZ=Asia/Shanghai
# 如果需要额外配置,在这里添加
# - KOMGA_CONFIGDIR=/config
# ========== Traefik 代理标签 ==========
labels:
- "traefik.enable=true"
- "traefik.http.routers.komga.rule=Host(`example.com`)" #替换成自己的域名,如果不使用traefik,注释所有labels即可
- "traefik.http.routers.komga.entrypoints=websecure"
- "traefik.http.routers.komga.tls=true"
- "traefik.http.routers.komga.tls.certresolver=letsencrypt"
- "traefik.http.services.komga.loadbalancer.server.port=25600"
# ========== 引用已存在的 Traefik 网络 ==========
networks:
traefik_public:
external: true
4 参数
容器镜像使用运行时传递的参数(如以上参数)进行配置。 这些参数分别用冒号分隔,表示外部:内部。 例如,-p 8080:80将使容器内的80端口可以从容器外主机IP的8080端口访问。
warning
确保/config文件夹使用本地文件系统。 不要使用任何网络共享,如CIFS 或 NFS。
| 参数 | 功能 |
|---|---|
-p 25600:25600 | Komga API 和 Web 界面的端口 |
--user 1000:1000 | 用户:组标识符 - 请参阅下面的说明 |
--mount type=bind,source=/path/to/config,target=/config | 数据库和 Komga 配置 |
--mount type=bind,source=/path/to/data,target=/data | 您的数据目录在磁盘上的位置。 选择一个包含您的书籍和您首选的导入位置的文件夹,以使硬链接正常工作。 |
-e TZ=Europe/London | 指定要使用的时区,请参阅 list |
-e ENV_VAR=value | 任意配置环境变量 |
4.1.1 apikey
- kmreader: 40d1cee3938c4b0891216d7a570b6911
5 更新
下面是更新容器的说明:
5.1 通过 Docker Run/Create
- 更新镜像:
docker pull gotson/komga - 停止运行中的容器:
docker stop komga - 删除容器:
docker rm komga - 使用与上述说明相同的参数重新创建新容器(如果正确映射到主机文件夹,你的
/config文件夹和设置将被保留) - 启动新的容器:
docker start komga - 你也可以删除旧的悬空镜像:
docker image prune
5.2 通过 Docker Compose
- 更新所有镜像:
docker compose pull- 或更新单独的镜像:
docker compose pulkomga
- 或更新单独的镜像:
- 让 Compose 按需更新所有容器:
docker compose up -d- 或更新单独的容器:
docker compose pulkomga
- 或更新单独的容器:
- 你也可以删除旧的悬空镜像:
docker image prune
6 推荐客户端
- 以下皆是ios客户端
6.1 非国区
6.1.1 免费
6.1.1.1 kyBooks 3
- opds连接
6.1.1.2 KMReader
- 官方推荐
6.2 国区
6.2.1 收费
6.2.1.1 Yomu
- 免费账户支持3个库显示