Skip to content

Commit

Permalink
update readme with env var config options
Browse files Browse the repository at this point in the history
  • Loading branch information
mycognosist committed Dec 23, 2022
1 parent 8147bea commit e479d09
Showing 1 changed file with 38 additions and 22 deletions.
60 changes: 38 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,42 @@ message publishing and replication. Indexing of database messages will be
offloaded to client applications (ie. piping feeds from solar into a SQLite
database).

## Quick Start

Clone the source and build the binary (see [RPi build instructions](https://mycelial.technology/computers/rust-compilation.html) if required):

```
git clone [email protected]:mycognosist/solar.git
cd solar
cargo build --release
```

Add peer(s) to `replication.toml` (public key(s) of feeds you wish to replicate):

```
vim ~/.local/share/solar/replication.toml
peers = ["@...=.ed25519"]
```

Run solar with LAN discovery enabled:

```
./target/release/solar --lan true
```

_Note: a new public-private keypair will be generated and saved to
`~/.local/share/solar/secret.toml` (or in the equivalent directory on your
operating system)._

## CLI

Solar can be configured and launched using the CLI interface.

`solar --help`

```shell
🌞 Solar 0.3.1-6266b38
🌞 Solar 0.3.1-1dad14c
Sunbathing scuttlecrabs in kuskaland

USAGE:
Expand All @@ -42,33 +70,21 @@ USAGE:
--resync <resync> Resync the local database by requesting the local feed from peers
```

## Quick Start

Clone the source and build the binary (see [RPi build instructions](https://mycelial.technology/computers/rust-compilation.html) if required):

```
git clone [email protected]:mycognosist/solar.git
cd solar
cargo build --release
```
## Environment Variables

Add peer(s) to `replication.toml` (public key(s) of feeds you wish to replicate):
Additional configuration parameters can be supplied via environment variables.

```
vim ~/.local/share/solar/replication.toml
peers = ["@...=.ed25519"]
RUST_LOG
SLED_CACHE_CAPACITY
SOLAR_JSONRPC_IP
SOLAR_JSONRPC_PORT
SOLAR_NETWORK_KEY
```

Run solar with LAN discovery enabled:

```
./target/release/solar --lan true
```
For example, run `solar` with a log-level of `debug` and an alternative network key:

_Note: a new public-private keypair will be generated and saved to
`~/.local/share/solar/secret.toml` (or in the equivalent directory on your
operating system)._
`RUST_LOG=solar=debug SOLAR_NETWORK_KEY=3c42fff79381c451fcafd73cec3c9f897bb2232949dcdd35936d64d67c47a374 solar`

## Core Features

Expand Down

0 comments on commit e479d09

Please sign in to comment.