| d23464c0 Andy McCall ↶ |
1 |
# Oxygenhub |
| 2 |
|
| 3 |
A forge for [Oxygen](../oxygen) repositories: hosting, browsing, review, |
| 4 |
issues and releases, in one Rust binary with one data directory. It works |
| 5 |
like GitHub where GitHub is right and differs where Oxygen's commutative |
| 6 |
model makes something better possible. The specification is |
| 7 |
[docs/spec.md](docs/spec.md); deployment notes are in |
| 8 |
[docs/deploy.md](docs/deploy.md). |
| 9 |
|
| 10 |
## Status |
| 11 |
|
| 12 |
Milestone 0.1 (browse): repositories are created by an administrator and |
| 13 |
filled by `oxy push`; the pages show trees, files, blame, history with the |
| 14 |
dependency graph, changes with diffs, comparisons, bookmarks, tags, |
| 15 |
conflicts, the trust policy and the push log. Accounts, proposals, issues |
| 16 |
and the rest follow the milestones in the specification. |
| 17 |
|
| 18 |
## Running |
| 19 |
|
| 20 |
``` |
| 21 |
cargo build --release |
| 22 |
target/release/oxygenhub --data /srv/oxygenhub init --base-url https://hub.example:7343 --self-signed |
| 23 |
target/release/oxygenhub --data /srv/oxygenhub admin repo create andy/oxygen --description "The VCS" |
| 24 |
target/release/oxygenhub --data /srv/oxygenhub serve |
| 25 |
``` |
| 26 |
|
| 27 |
Then from any checkout: `oxy remote add hub https://hub.example:7343/andy/oxygen` |
| 28 |
and `oxy push hub`. With a self-signed certificate, hand clients the CA with |
| 29 |
`OXY_CA=<path>` or `oxy config remote.hub.ca <path>`. |
| 30 |
|
| 31 |
Configuration lives in `<data>/hub.toml` (spec §17.1) and every key can be |
| 32 |
overridden with `OXYHUB_<SECTION>_<KEY>`. |
| 33 |
|
| 34 |
## Layout |
| 35 |
|
| 36 |
``` |
| 37 |
crates/hub the binary: config, db (sqlx + migrations), repos (registry, locks, views), |
| 38 |
protocol (embedded oxy-server), web (pages), api (JSON), render (markdown, |
| 39 |
highlighting, diffs, graph) |
| 40 |
crates/hub-api the JSON API's types, shared with clients |
| 41 |
templates/ askama templates and the stylesheet |
| 42 |
assets/ vendored fonts, icons, the small progressive-enhancement script |
| 43 |
migrations/ under crates/hub; applied at start |
| 44 |
``` |
| 45 |
|
| 46 |
## Developing |
| 47 |
|
| 48 |
`make check` runs formatting, clippy with warnings as errors, and the tests. |
| 49 |
The tests use a real `oxy-core` client against a hub on a loopback port and |
| 50 |
never touch your own Oxygen configuration. |