aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 9ba221368d87b27bece456a8796c0009acfd4915 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
cgithub is a lightweight GitHub alternative frontend. It has no bloated
JavaScript and doesn't require API keys. To use it, host cgithub on your own
server then replace `github.com` in your URL with your domain.

## Development

To run the server locally:
```
$ pnpm run dev
```

To run tests:
```
$ pnpm test
```

## Deployment

Assuming you have a server `jupiter`, you might deploy like:
```
$ pnpm run build
$ rsync -av --del dist jupiter:/opt/cgithub
```

To configure systemd socket activation use a `cgithub.socket` file:
```
[Socket]
ListenStream=/run/cgithub/socket
SocketGroup=nginx
SocketMode=0660

[Install]
WantedBy=sockets.target
```

And a service file `cgithub.service`:
```
[Unit]
After=cgithub.socket
Requires=cgithub.socket

[Service]
Type=exec
WorkingDirectory=/opt/cgithub
ExecStart=/usr/bin/node dist/build/index.js
DynamicUser=true
```

An nginx config snippet might be:
```
location / {
    proxy_pass http://unix:/run/cgithub/socket;
}
```

## Disclosures

AI coding assistants, in particular Claude, are used in the development process.

[Phospor Icons](https://phosphoricons.com/) used under MIT license.