mirror of
https://github.com/Redume/Kekkai.git
synced 2025-02-23 12:43:12 +03:00
Some checks failed
Create and publish a Docker image / build-and-push-server (push) Has been cancelled
Create and publish a Docker image / build-and-push-chart (push) Has been cancelled
Create and publish a Docker image / build-and-push-CR (push) Has been cancelled
Deploy docs / deploy (push) Has been cancelled
132 lines
No EOL
4.1 KiB
Markdown
132 lines
No EOL
4.1 KiB
Markdown
Kekkai can be configured using the `config.yaml` file in the working directory. `config.example.yaml`.
|
|
|
|
??? "Example file `config.example.yaml`"
|
|
```
|
|
# For more information, see the documentation
|
|
# https://kekkai-docs.redume.su/
|
|
|
|
database:
|
|
user: 'DATABASE_USERNAME'
|
|
password: 'DATABASE_PASSWORD'
|
|
host: 'DATABASE_HOST'
|
|
name: 'DATABASE_NAME'
|
|
port: 5432
|
|
server:
|
|
host: '0.0.0.0'
|
|
ssl:
|
|
private_key: '/CertSSL/privkey.pem'
|
|
cert: '/CertSSL/fullchain.pem'
|
|
work: true
|
|
log:
|
|
print: true
|
|
level: 'info'
|
|
analytics:
|
|
plausible_api: 'https://plausible.io/api/event/'
|
|
plausible_domain: 'PLAUSIBLE_DOMAIN'
|
|
plausible_token: 'PLAUSIBLE_TOKEN'
|
|
work: true
|
|
currency:
|
|
chart:
|
|
save: false
|
|
collecting:
|
|
fiat: true
|
|
schedule: '30 8 * * *'
|
|
fiat:
|
|
- USD
|
|
- RUB
|
|
- EUR
|
|
- UAH
|
|
- TRY
|
|
- KZT
|
|
```
|
|
|
|
## Database
|
|
Kekkai is used as a `PostgreSQL` database.
|
|
|
|
!!! info
|
|
If you installed Kekkai via Docker Compose, then install it in the `database.host` value of `postgres`.
|
|
The rest of the data does not have to be filled in. They need to be filled in `.env`.
|
|
|
|
What should it look like:
|
|
```yaml
|
|
database:
|
|
...
|
|
host: 'postgres'
|
|
...
|
|
...
|
|
```
|
|
|
|
## Server
|
|
!!! info
|
|
If you installed Kekkai via Docker Compose, then changing `server.host`, `server.ssl` is not recommended.
|
|
|
|
### SSL
|
|
Create a folder CertSSL to store your certificates
|
|
```shell
|
|
mkdir CertSSL
|
|
```
|
|
|
|
Copy your certificates to the CertSSL folder.
|
|
|
|
It is recommended to rename the certificates to `privkey.pem` and `fullchain.pem`.
|
|
If this is not possible, you need to change the SSL name in `nginx.conf` (if using Docker Compose)
|
|
|
|
## Analytics
|
|
Kekkai uses [`Plausbile`](https://plausible.io/) as an analyst. Minimal data is transferred for anilithics.
|
|
Such as: browser, OS, status code, url, where the user came from.
|
|
Most of the data is built on User Agent. It is possible to disable analytics in Kekkai.
|
|
|
|
|
|
??? note
|
|
```yaml
|
|
...
|
|
analytics:
|
|
plausible_api: 'https://plausible.io/api/event/'
|
|
plausible_domain: 'PLAUSIBLE_DOMAIN'
|
|
plausible_token: 'PLAUSIBLE_TOKEN'
|
|
work: true
|
|
...
|
|
```
|
|
|
|
- `plausible_api`: This is where the Plausible instance is specified.
|
|
The official instance is specified by default.
|
|
- `plausible_domain`: Kekkai Instance Domain.
|
|
It should be added to Plausible first, and then to the config. You can add the domain [here](https://plausible.io/sites/new?flow=provisioning).
|
|
- `plausible_token`: Api token for authorization and sending requests. You can create it [here](https://plausible.io/settings/api-keys).
|
|
- `work`: Enable or disable analytics.
|
|
|
|
## Currency
|
|
`DuckDuckGo` (fiat currency collection) and `CoinMarketCap` (cryptocurrency collection)
|
|
are used to collect currency rates.
|
|
|
|
??? note
|
|
```yaml
|
|
...
|
|
currency:
|
|
chart:
|
|
save: false # Enable or disable saving graphs to an image (Boolean)
|
|
collecting:
|
|
fiat: true # Turn off or turn on the collection of the fiat currency rate [Boolean]
|
|
crypto: false
|
|
schedule: '30 8 * * *' # Currency collection schedule in crontab format [String]
|
|
crypto_apikey: 'APIKEY'
|
|
fiat: # List of fiat currency to save the exchange rate [Array]
|
|
- USD
|
|
- RUB
|
|
- EUR
|
|
- UAH
|
|
- TRY
|
|
- KZT
|
|
crypto:
|
|
- ETH
|
|
- TON
|
|
- USDT
|
|
```
|
|
|
|
- `currency.chart.save`: Enable or disable saving graphs.
|
|
- `currency.collecting`: Enable or disable cryptocurrency or fiat currency exchange rate collection.
|
|
- `currency.schedule`: Currency collection interval (Configurable via cron.
|
|
It is recommended to use [crontab.guru](https://crontab.guru), not supported in `Non-standard format`, like `@daily`).
|
|
- `crypto.crypto_apiKey`: API-key from CoinMarketCap service
|
|
- `currency.fiat`: A list of fiat currencies that will be saved to the database.
|
|
- `currency.crypto`: A list of crypto currencies that will be saved to the database. |