prime8dev

prime8dev
git clone https://git.prime8.dev/prime8dev.git
Log | Files | Refs | README | LICENSE

README.md (1263B)


      1 # prime8.dev backend
      2 
      3 Go + html/template backend for [prime8.dev](https://prime8.dev).
      4 
      5 ## Stack
      6 
      7 - Go
      8 - Chi
      9 - HTMX
     10 
     11 ## Development
     12 
     13 Run locally:
     14 
     15 ```sh
     16 go run ./cmd/tui
     17 go run ./cmd/buildjs
     18 go run ./cmd/server
     19 ```
     20 
     21 Or use `just` recipes:
     22 
     23 ```sh
     24 just web
     25 just ssh
     26 just tui
     27 ```
     28 
     29 Build Docker image:
     30 
     31 ```sh
     32 docker build -t prime8dev .
     33 ```
     34 
     35 ## Projects
     36 
     37 Project READMEs are read from local bare git repos with
     38 `git` (no API). Files referenced from a README are served from `HEAD` at
     39 `/projects/<id>/raw/<path>`.
     40 
     41 Public repos (those with `git-daemon-export-ok`) can be cloned over:
     42 
     43 - HTTPS (dumb HTTP, served by the reverse proxy): `git clone https://prime8.dev/<repo>.git`
     44 - SSH (the public SSH server runs `git-upload-pack`, read-only): `git clone git@prime8.dev:<repo>.git`
     45 
     46 | Env | Default | Purpose |
     47 | --- | --- | --- |
     48 | `GIT_REPOS_DIR` | `/srv/git/repos` | Bare repos live at `$GIT_REPOS_DIR/<repo>.git` |
     49 | `GIT_CLONE_BASE` | `https://prime8.dev` | HTTPS clone URL shown on project pages: `<base>/<repo>.git` |
     50 
     51 In Docker, bind-mount the repos read-only, e.g.
     52 `-v /srv/git/repos:/srv/git/repos:ro`. The image sets
     53 `safe.directory '*'` so repos owned by another uid are readable.
     54 
     55 ## Deploy
     56 
     57 Deploys are triggered by a `post-receive` hook on the bare repo.