Skip to content

Commit

Permalink
Document new setup process
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddyGuthridge committed Oct 15, 2024
1 parent 4ad99ed commit 307d871
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
28 changes: 18 additions & 10 deletions design/Setup.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
# Setup process

1. User specifies a data repository URL, which is then cloned.
2. If the repo is empty, some default data is configured:
* `config.json` with the site's default configuration
* `.gitignore` with a simple gitignore to ignore the local configuration
3. Otherwise, the `.gitignore` is checked to ensure that `config.local.json`
will be ignored (lest auth information be leaked).
4. A secure password is generated, and stored securely in `config.local.json`.
It is shown to the user once, and they are prompted to take note of it.

The site is then fully configured.
## 1. Account creation

The user creates the initial account, which triggers the private data setup.

## 2. Data initialization

The user then chooses how to initialize the repo:

* From a `git` repo. The repo is cloned.
* Empty, meaning a new blank repository is created.

The user is also given the options to control how the server uses SSH keys.
Allowed options are:

* Generate an SSH key-pair, stored within the private data.
* Use an existing private key given its path.
* Use the default SSH identity, which works best if the app is running on an
account with existing SSH access.
3 changes: 3 additions & 0 deletions src/lib/server/data/localConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export const ConfigLocalJsonStruct = object({
*
* The public key file is expected to be the same as the private key, with a
* `.pub` suffix.
*
* If this is `null`, then the `ssh` executable will be free to choose an
* appropriate SSH key to use.
*/
keyFile: nullable(string()),
/** Version of server that last accessed the config.local.json */
Expand Down

0 comments on commit 307d871

Please sign in to comment.