-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d71f405
commit 5b662e7
Showing
5 changed files
with
42 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
``` | ||
|
@@ -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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" | ||
|
||
|
@@ -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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters