de72557084d85f8de51debfa462e0c174703b7b5

Author
Christian Rocha <christian@rocha.is>
Committer
Toby Padilla <toby@charm.sh>
Date

Message

Add example config to the README

Diff

 1diff --git a/README.md b/README.md
 2index 45c0f8fc81240470c8ca269826dd7958dfed8152..2caaa4a6e1bb5f612e19b226bd714b392481f3ba 100644
 3--- a/README.md
 4+++ b/README.md
 5@@ -32,6 +32,53 @@ Make sure `git` is installed, then run `soft`. That’s it.
 6 
 7 ## Configuration
 8 
 9+The Soft Serve configuration is simple and straightforward:
10+
11+```yaml
12+# The name of the server to show in the TUI.
13+name: Soft Serve
14+
15+# The host and port to listen on. Defaults to 0.0.0.0:23231.
16+host: localhost
17+port: 23231
18+
19+# The access level for anonymous users. Options are: read-write, read-only
20+# and no-access.
21+anon-access: read-write
22+
23+# You can grant read-only access to users without private keys.
24+allow-keyless: false
25+
26+# Which repos should appear in the menu?
27+repos:
28+  - name: Home
29+    repo: config
30+    private: true
31+    note: "Configuration and content repo for this server"
32+  - name: Example Public Repo
33+    repo: my-public-repo
34+    private: false
35+    note: "A publicly-accessible repo"
36+  - name: Example Public Repo
37+    repo: my-private-repo
38+    private: true
39+    note: "A private repo"
40+
41+# Authorized users. Admins have full access to all repos. Regular users
42+# can read all repos and push to their collab-repos.
43+users:
44+  - name: Beatrice
45+    admin: true
46+    public-key:
47+        KEY TEXT
48+  - name: Frankie
49+    collab-repos:
50+      - my-public-repo
51+      - my-private-repo
52+    public-key:
53+        KEY TEXT
54+```
55+
56 When `soft` is run for the first time, it creates a configuration repo
57 containing the main README displayed in the TUI as well as a config file for
58 user access control.