0a89da14316d23b1d4556e7eca8e095c4c1d2463
- Author
- Ayman Bagabas <ayman.bagabas@gmail.com>
- Committer
- Ayman Bagabas <ayman.bagabas@gmail.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/Dockerfile b/Dockerfile
2index 6b451e96b2410d08c894a36396bf0c033989431f..ec3a5f728be3b36013570ff5e0243fadaa5a9a8a 100644
3--- a/Dockerfile
4+++ b/Dockerfile
5@@ -10,9 +10,8 @@ WORKDIR /soft-serve
6 VOLUME /soft-serve
7
8 # Environment variables
9-ENV SOFT_SERVE_KEY_PATH "/soft-serve/ssh/soft_serve_server_ed25519"
10+ENV SOFT_SERVE_DATA_PATH "/soft-serve"
11 ENV SOFT_SERVE_INITIAL_ADMIN_KEY ""
12-ENV SOFT_SERVE_REPO_PATH "/soft-serve/repos"
13
14 # Expose ports
15 # SSH
16diff --git a/README.md b/README.md
17index 399fd8f132c10af617c351d3197130d336179f0a..bc02e080626222db4f28f620b787b83d6263d64f 100644
18--- a/README.md
19+++ b/README.md
20@@ -1,5 +1,4 @@
21-Soft Serve
22-==========
23+# Soft Serve
24
25 <p>
26 <img style="width: 451px" src="https://stuff.charm.sh/soft-serve/soft-serve-header.png?0" alt="A nice rendering of some melting ice cream with the words ‘Charm Soft Serve’ next to it"><br>
27@@ -17,12 +16,13 @@ A tasty, self-hostable Git server for the command line. 🍦
28 <img src="https://stuff.charm.sh/soft-serve/soft-serve-demo.gif?0" alt="Soft Serve screencast">
29 </picture>
30
31-* Configure with `git`
32-* Create repos on demand with `git push`
33-* Browse repos, files and commits with an SSH-accessible TUI
34-* TUI mouse support
35-* Print files over SSH with or without syntax highlighting and line numbers
36-* Easy access control
37+- Glamorous clean SSH TUI
38+- Clone repos over SSH, HTTP, or Git protocol
39+- Manage repos with SSH
40+- Create repos on demand with SSH or `git push`
41+- Browse repos, files and commits with SSH-accessible
42+- Print files over SSH with or without syntax highlighting and line numbers
43+- Easy access control with SSH
44 - Allow/disallow anonymous access
45 - Add collaborators with SSH public keys
46 - Repos can be public or private
47@@ -36,13 +36,13 @@ Just run `ssh git.charm.sh` for an example. You can also try some of the followi
48 ssh git.charm.sh -t soft-serve
49
50 # Print out a directory tree for a repo
51-ssh git.charm.sh ls soft-serve
52+ssh git.charm.sh repo tree soft-serve
53
54 # Print a specific file
55-ssh git.charm.sh cat soft-serve/cmd/soft/root.go
56+ssh git.charm.sh repo blob soft-serve cmd/soft/root.go
57
58 # Print a file with syntax highlighting and line numbers
59-ssh git.charm.sh cat soft-serve/cmd/soft/root.go -c -l
60+ssh git.charm.sh repo blob soft-serve cmd/soft/root.go -c -l
61 ```
62
63 ## Installation
64@@ -90,7 +90,112 @@ go install github.com/charmbracelet/soft-serve/cmd/soft@latest
65
66 ## Setting up a server
67
68-Make sure `git` is installed, then run `soft`. That’s it.
69+Make sure `git` is installed, then run `soft serve`. That’s it.
70+
71+This will create a `data` directory that will store all the repos, ssh keys,
72+and database.
73+
74+To change the default data path use `SOFT_SERVE_DATA_PATH` environment variable.
75+
76+```sh
77+SOFT_SERVE_DATA_PATH=/var/lib/soft-serve soft serve
78+```
79+
80+When you run Soft Serve for the first time, make sure you have the
81+`SOFT_SERVE_INITIAL_ADMIN_KEY` environment variable is set to your ssh
82+authorized key. Any added key to this variable will be treated as admin with
83+full privileges.
84+
85+Using this environment variable, Soft Serve will create a new `admin` user that
86+has full privileges. You can rename and change the user settings later.
87+
88+### Server Settings
89+
90+Once you start the server for the first time, the settings will be in
91+`config.yaml` under your data directory. The default `config.yaml` is
92+self-explanatory and will look like this:
93+
94+```yaml
95+# Soft Serve Server configurations
96+
97+# The name of the server.
98+# This is the name that will be displayed in the UI.
99+name: "Soft Serve"
100+
101+# The SSH server configuration.
102+ssh:
103+ # The address on which the SSH server will listen.
104+ listen_addr: ":23231"
105+
106+ # The public URL of the SSH server.
107+ # This is the address that will be used to clone repositories.
108+ public_url: "ssh://localhost:23231"
109+
110+ # The path to the SSH server's private key.
111+ key_path: "ssh/soft_serve_host"
112+
113+ # The path to the SSH server's client private key.
114+ # This key will be used to authenticate the server to make git requests to
115+ # ssh remotes.
116+ client_key_path: "ssh/soft_serve_client"
117+
118+ # The path to the SSH server's internal api private key.
119+ internal_key_path: "ssh/soft_serve_internal"
120diff --git a/docker.md b/docker.md
121index 79a3b636e4342036fcc51a01c94ab2259eda4154..32cadde9c90ba07fa4773c9d62f0bbe3756fa15d 100644
122--- a/docker.md
123+++ b/docker.md
124@@ -15,6 +15,9 @@ docker run \
125 --name=soft-serve \
126 --volume /path/to/data:/soft-serve \
127 --publish 23231:23231 \
128+ --publish 9418:9418 \
129+ --publish 8080:8080 \
130+ --publish 8081:8081 \
131 --restart unless-stopped \
132 charmcli/soft-serve:latest
133 ```
134@@ -32,6 +35,9 @@ services:
135 - /path/to/data:/soft-serve
136 ports:
137 - 23231:23231
138+ - 9418:9418
139+ - 8080:8080
140+ - 8081:8081
141 restart: unless-stopped
142 ```
143