update docs
check-and-test / check-and-test (push) Successful in 1m2s Details

This commit is contained in:
Nikita Vilunov 2023-10-10 02:18:50 +02:00
parent f0b38545bf
commit 155e2c07a5
4 changed files with 58 additions and 13 deletions

View File

@ -18,25 +18,12 @@ Print content of a TLS certificate:
openssl x509 -in certs/xmpp.pem -text
Make sure `xmpp.key` starts and ends with:
```
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
```
## Protocol Specs
XMPP XSDs - [https://xmpp.org/schemas/index.shtml]
IRC modern spec - [https://modern.ircdocs.horse/]
## Initializing DB with some users
sqlite3 db.sqlite < test/init_state.sql
Same test migration could be used for integration tests in the future.
## Using irssi
irssi in a TUI-based IRC client.

54
docs/running.md Normal file
View File

@ -0,0 +1,54 @@
# Building & Running Lavina
## Configuration
A server instance must be supplied with a configuration file to start up. The path to configuration is specified with a required CLI argument `--config <path>`.
Example configuration:
```toml
[telemetry]
# address for management and telemetry API
# should be kept private
listen_on = "127.0.0.1:8080"
[irc]
listen_on = "127.0.0.1:6667"
server_name = "irc.localhost"
[xmpp]
listen_on = "127.0.0.1:5222"
cert = "./certs/xmpp.pem"
key = "./certs/xmpp.key"
[storage]
db_path = "db.sqlite"
```
## With Docker Compose
Example `docker-compose.yml` file:
```yaml
version: '3.0'
services:
lavina:
image: git.vilunov.me/lavina/lavina:0.0.1
volumes:
- './config/:/etc/lavina/'
- './data/:/var/lib/lavina/'
ports:
- '5222:5222' # xmpp
- '6667:6667' # irc non-tls
- '127.0.0.1:1380:8080' # management http (private)
```
## With Cargo
You can run it via cargo:
cargo run -- --config config.toml
Or you can build it and run manually:
cargo build --release
./target/release/lavina --config config.toml

View File

@ -2,6 +2,10 @@
Multiprotocol chat server based on open protocols.
- [How to run Lavina locally](docs/running.md)
- [Architectural diagrams](docs/flow.md)
- [Project structure](crates/readme.md)
## Goals
#### Support for multiple open protocols