Milestone 3: the hub

lunehub serves accounts, invites, pairing codes, memberships, devices
and vaults as plain bare repos (SPEC §8), checks device key and role on
every Git request, refuses secrets in a pre-receive hook (P3) and logs
every access change. Ships as one container (Dockerfile, compose.yaml).

lunesync gains join, login, pair, vault new/upload, invite, grant,
members and hub log; `run` picks up new vaults and roles from the hub.
Read members' edits stay local.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 00:47:54 +07:00
parent 62bc3db416
commit 2b4ca84a6b
23 changed files with 2578 additions and 58 deletions

16
Dockerfile Normal file
View File

@@ -0,0 +1,16 @@
# Lune hub: one container, data on /data.
FROM rust:1.99-bookworm AS build
WORKDIR /src
COPY . .
RUN cargo build --release -p lunehub
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates && rm -rf /var/lib/apt/lists/* \
&& useradd --system --uid 1000 --home /data lune && mkdir /data && chown lune /data
COPY --from=build /src/target/release/lunehub /usr/local/bin/lunehub
USER lune
ENV LUNE_HUB_DATA=/data LUNE_HUB_LISTEN=0.0.0.0:8080
VOLUME /data
EXPOSE 8080
HEALTHCHECK --interval=30s --start-period=5s CMD ["lunehub", "health"]
CMD ["lunehub", "serve"]