feat(infra/k8s): Rewrite cgit URLs by routing them through nginx

Configures nginx to rewrite all requests to cgit, except for those
retrieving static files, to `/depot/`.

In combination with the previous commits that apply patches to cgit
itself, this effectively means that the depot is rendered on the site
root.

This is pretty cool: It lets people do stuff like `git clone
https://git.tazj.in` and get the depot!
This commit is contained in:
Vincent Ambo 2019-12-20 18:42:56 +00:00
parent 0dee62cd7b
commit c3586aa8ba
3 changed files with 27 additions and 10 deletions

View file

@ -65,10 +65,9 @@ kind: Service
metadata:
name: cgit
spec:
type: NodePort
selector:
app: cgit
ports:
- protocol: TCP
port: 2448 # cgit
port: 80
targetPort: 8080