Repositories
How codeview finds and names repositories, and setups for a plain folder, soft-serve, gickup, and several sources.
codeview reads whatever is on disk. It walks --dir up to five folders deep, follows symlinks, and picks up bare repositories and working copies. The depth bound also stops symlink cycles.
Each repository is named after its origin remote, like github.com/toaweme/cli, or after its folder when it has none.
Plain folder
Mirror each repository into one folder.
git clone --mirror https://github.com/toaweme/cli.git /srv/git/cli.git
codeview serve --dir /srv/gitRemember to touch git-daemon-export-ok in each mirror you want shown, or serve with --mode all.
soft-serve
Point codeview at the repos/ folder in soft-serve's data path.
codeview serve --dir /var/lib/soft-serve/repossoft-serve tracks visibility in its own database, which codeview does not read. Touch git-daemon-export-ok in the repositories you want shown, or use --mode all.
gickup
Have gickup mirror into a local destination as bare repositories.
source:
github:
- user: toaweme
destination:
local:
- path: /srv/gickup
structured: true
bare: trueThen serve the destination path.
codeview serve --dir /srv/gickupSeveral sources
Symlink each source into one folder and serve that.
mkdir -p /srv/view
ln -sfn /var/lib/soft-serve/repos /srv/view/soft-serve
ln -sfn /srv/gickup /srv/view/gickup
codeview serve --dir /srv/viewWith Docker, mount each source under /repos instead, since symlinks to host paths do not resolve inside the container.
docker run -d -p 8080:8080 \
-v /var/lib/soft-serve/repos:/repos/soft-serve:ro \
-v /srv/gickup:/repos/gickup:ro \
-e CODEVIEW_MODE=all \
ghcr.io/toaweme/codeview