Skip to content

feat(deploy): ship WAL-Git and WAL-Github with Docker Compose - #2

Open
HernandoR wants to merge 2 commits into
rgodha24:mainfrom
HernandoR:feat/docker-compose-walgit-walgithub
Open

HernandoR wants to merge 2 commits into
rgodha24:mainfrom
HernandoR:feat/docker-compose-walgit-walgithub

Conversation

@HernandoR

Copy link
Copy Markdown

Summary

Package the WAL deployment as a Docker Compose stack with exactly two services:

  • WAL-Git (:8080) — token/OIDC auth, serve + maintain
  • WAL-Github (:8097) — the GHES facade, auth-free and loopback-only, serve + events

One Dockerfile builds both images: the default bakes deploy/host.toml; WAL-Github selects deploy/walgithub.toml and port 8097 through build args. deploy/compose.yaml starts no S3 backend — operators point both services at their own bucket via deploy/walgit.env.example. The optional rustfs dev store is a separate Compose project (deploy/compose.rustfs.yaml).

Both services run with a read-only root filesystem, a tmpfs /tmp, a disposable cache volume, JSON log rotation and a 60s stop grace period for the D31 drain.

Also

  • docs/HOSTING.md: build, auth, TLS, cache/rootfs, the two-service split, upgrades, troubleshooting.
  • Fix token_env-only static tokens: StaticToken.token now defaults to empty, so the documented { principal = "admin", token_env = "WALGIT_TOKEN" } shape loads; validation still requires one of token/token_env. Regression test included.
  • Containerfile → Dockerfile; CI validates the two-service Compose file and keeps the facade smoke image.
  • README, AGENTS, CONTRACT, justfile, site and config headers updated for the new layout.

Tested locally

OrbStack / Docker 29.8.2:

  • docker compose -f deploy/compose.yaml up -d --build: both services healthy.
  • WAL-Git: token auth, push/clone, API; WAL-Github: open UI, /api/v3/repos/..., clone, create/delete ref.
  • Cold start after down -v: repo re-seeded through WAL-Git and visible through both services.
  • cargo test -p walgit-config: 13 passed.

A static token whose secret comes from token_env was rejected by serde because the literal token field was mandatory, so the documented token_env-only shape failed to load. Default token to an empty string; validate still requires token or token_env, and resolve_tokens still drops empty secrets. Add a regression test.
Add one Dockerfile for both services: the default bakes deploy/host.toml for WAL-Git, while WAL-Github selects deploy/walgithub.toml and port 8097 through build args. deploy/compose.yaml runs exactly those two services against an object store supplied by the operator; it starts no S3 backend. The optional rustfs dev store moves to deploy/compose.rustfs.yaml as a separate Compose project. Both services run with a read-only root filesystem, tmpfs /tmp and a disposable cache volume, and docs/HOSTING.md documents auth, TLS, roles, upgrades and the two-service split. Update README, AGENTS, CONTRACT, CI, justfile and the site; replace Containerfile with Dockerfile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant