From de72557084d85f8de51debfa462e0c174703b7b5 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Tue, 12 Oct 2021 12:37:44 -0400 Subject: [PATCH] Add example config to the README --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/README.md b/README.md index 45c0f8fc81240470c8ca269826dd7958dfed8152..2caaa4a6e1bb5f612e19b226bd714b392481f3ba 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,53 @@ Make sure `git` is installed, then run `soft`. That’s it. ## Configuration +The Soft Serve configuration is simple and straightforward: + +```yaml +# The name of the server to show in the TUI. +name: Soft Serve + +# The host and port to listen on. Defaults to 0.0.0.0:23231. +host: localhost +port: 23231 + +# The access level for anonymous users. Options are: read-write, read-only +# and no-access. +anon-access: read-write + +# You can grant read-only access to users without private keys. +allow-keyless: false + +# Which repos should appear in the menu? +repos: + - name: Home + repo: config + private: true + note: "Configuration and content repo for this server" + - name: Example Public Repo + repo: my-public-repo + private: false + note: "A publicly-accessible repo" + - name: Example Public Repo + repo: my-private-repo + private: true + note: "A private repo" + +# Authorized users. Admins have full access to all repos. Regular users +# can read all repos and push to their collab-repos. +users: + - name: Beatrice + admin: true + public-key: + KEY TEXT + - name: Frankie + collab-repos: + - my-public-repo + - my-private-repo + public-key: + KEY TEXT +``` + When `soft` is run for the first time, it creates a configuration repo containing the main README displayed in the TUI as well as a config file for user access control.