Skip to content

Commit

Permalink
📝 Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
0x46616c6b committed Oct 22, 2023
1 parent d71f405 commit 5b662e7
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 28 deletions.
5 changes: 5 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
default: true
line-length:
line_length: 160
code-block-style: false
5 changes: 3 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# API Specification

!!! important
The Specification is work in progress at the moment. Inaccuracies or errors are possible.
!!! Information

The API Specification only contains the public endpoints at the moment.

!!swagger swagger.yaml!!
29 changes: 17 additions & 12 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@ log_level: "error"
log_format: "json"
# initiator is the email for the first admin user (see password in logs)
initiator: "[email protected]"
# database is the path to the bolt file
database: "ticker.db"
# configuration for the database
database:
type: "sqlite" # postgres, mysql, sqlite
dsn: "ticker.db" # postgres: "host=localhost port=5432 user=ticker dbname=ticker password=ticker sslmode=disable"
# secret used for JSON Web Tokens
secret: "slorp-panfil-becall-dorp-hashab-incus-biter-lyra-pelage-sarraf-drunk"
# telegram configuration
telegram_bot_token: ""
# listen port for prometheus metrics exporter
metrics_listen: ":8181"
# path where to store the uploaded files
upload_path: "/path/to/uploads"
upload_path: "uploads"
# base url for uploaded assets
upload_url: "http://localhost:8080"
```
Expand All @@ -30,12 +32,15 @@ upload_url: "http://localhost:8080"

The following env vars can be used:

* TICKER_DATABASE
* TICKER_LISTEN
* TICKER_LOG_LEVEL
* TICKER_INITIATOR
* TICKER_SECRET
* TICKER_TELEGRAM_BOT_TOKEN
* TICKER_METRICS_LISTEN
* TICKER_UPLOAD_PATH
* TICKER_UPLOAD_URL
* `TICKER_LISTEN`
* `TICKER_LOG_FORMAT`
* `TICKER_LOG_LEVEL`
* `TICKER_DATABASE_TYPE`
* `TICKER_DATABASE_DSN`
* `TICKER_LOG_LEVEL`
* `TICKER_INITIATOR`
* `TICKER_SECRET`
* `TICKER_TELEGRAM_BOT_TOKEN`
* `TICKER_METRICS_LISTEN`
* `TICKER_UPLOAD_PATH`
* `TICKER_UPLOAD_URL`
22 changes: 10 additions & 12 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

**Service to distribute short messages in support of events, demonstrations, or other time-sensitive events.**

This repository contains the API and storage for
the [Systemli Ticker Project](https://www.systemli.org/en/service/ticker.html).
This repository contains the API for the [Systemli Ticker Project](https://www.systemli.org/en/service/ticker.html).

!!! note "Requirements"

Expand All @@ -12,20 +11,19 @@ the [Systemli Ticker Project](https://www.systemli.org/en/service/ticker.html).

## First run

- make sure you have pulled the repository
1. Clone the project

```shell
git clone [email protected]:systemli/ticker.git
```
git clone <https://github.com/systemli/ticker.git>

- start the ticker
2. Start the project

```shell
cp config.yml.dist config.yml
go run . run
```
cd ticker
cp config.yml.dist config.yml
go run . run

Now you have a running ticker API!
3. Check the API

curl http://localhost:8080/v1/health

## Testing

Expand Down
9 changes: 7 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ site_name: Systemli Ticker
site_author: Systemli Admin Team
repo_url: https://github.com/systemli/ticker

nav:
- Home: index.md
- Configuration: configuration.md
- API: api.md
- Quick Install Guide: quick-install.md

theme:
name: material

Expand All @@ -24,5 +30,4 @@ extra:

markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences
- pymdownx.betterem

0 comments on commit 5b662e7

Please sign in to comment.