mirror of
https://github.com/Redume/Kekkai.git
synced 2025-03-12 19:44:39 +03:00
docs: Rename the file, replace the examples with a new config
This commit is contained in:
parent
dd73f73869
commit
f79d2b166a
2 changed files with 100 additions and 66 deletions
|
@ -51,8 +51,8 @@ export default defineConfig({
|
||||||
slug: 'docs/config/config-env'
|
slug: 'docs/config/config-env'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Configure config.yaml',
|
label: 'Configure config.hjson',
|
||||||
slug: 'docs/config/config-yaml'
|
slug: 'docs/config/config-hjson'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Configure Nginx',
|
label: 'Configure Nginx',
|
||||||
|
|
|
@ -1,66 +1,93 @@
|
||||||
---
|
---
|
||||||
title: Configure config.yaml
|
title: Configure config.hjson
|
||||||
---
|
---
|
||||||
|
|
||||||
import { Aside } from '@astrojs/starlight/components';
|
import { Aside } from '@astrojs/starlight/components';
|
||||||
|
|
||||||
Kekkai can be configured using the `config.yaml` file in the working directory.
|
Kekkai can be configured using the `config.hjson` file in the working directory.
|
||||||
`config.example.yaml`.
|
`config.example.hjson`.
|
||||||
|
|
||||||
```yaml
|
```hjson
|
||||||
# For more information, see the documentation
|
# For more information, see the documentation
|
||||||
# https://kekkai-docs.redume.su/
|
# https://kekkai-docs.redume.su/
|
||||||
|
|
||||||
database:
|
{
|
||||||
user: 'DATABASE_USERNAME'
|
database:
|
||||||
password: 'DATABASE_PASSWORD'
|
{
|
||||||
host: 'DATABASE_HOST'
|
user: DATABASE_USERNAME
|
||||||
name: 'DATABASE_NAME'
|
password: DATABASE_PASSWORD
|
||||||
|
host: localhost
|
||||||
|
name: kekkai
|
||||||
port: 5432
|
port: 5432
|
||||||
server:
|
}
|
||||||
host: '0.0.0.0'
|
server:
|
||||||
|
{
|
||||||
|
host: 0.0.0.0
|
||||||
ssl:
|
ssl:
|
||||||
private_key: '/CertSSL/privkey.pem'
|
{
|
||||||
cert: '/CertSSL/fullchain.pem'
|
private_key: /CertSSL/privkey.pem
|
||||||
work: true
|
cert: /CertSSL/fullchain.pem
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
log:
|
log:
|
||||||
print: true
|
{
|
||||||
level: 'info'
|
level: info
|
||||||
analytics:
|
}
|
||||||
plausible_api: 'https://plausible.io/api/event/'
|
}
|
||||||
plausible_domain: 'PLAUSIBLE_DOMAIN'
|
analytics:
|
||||||
plausible_token: 'PLAUSIBLE_TOKEN'
|
{
|
||||||
work: false
|
plausible_domain: plausible.io
|
||||||
currency:
|
plausible_token: TOKEN
|
||||||
chart:
|
enabled: false
|
||||||
save: false
|
}
|
||||||
|
currency:
|
||||||
|
{
|
||||||
collecting:
|
collecting:
|
||||||
|
{
|
||||||
fiat: true
|
fiat: true
|
||||||
schedule: '30 8 * * *'
|
crypto: false
|
||||||
|
schedule: 30 8 * * *
|
||||||
|
crypto_apikey: TOKEN
|
||||||
|
}
|
||||||
fiat:
|
fiat:
|
||||||
- USD
|
[
|
||||||
- RUB
|
USD
|
||||||
- EUR
|
RUB
|
||||||
- UAH
|
EUR
|
||||||
- TRY
|
UAH
|
||||||
- KZT
|
TRY
|
||||||
|
KZT
|
||||||
|
]
|
||||||
|
crypto:
|
||||||
|
[
|
||||||
|
ETH
|
||||||
|
TON
|
||||||
|
USDT
|
||||||
|
BTC
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Database
|
## Database
|
||||||
Kekkai is used as a `PostgreSQL` database.
|
Kekkai is used as a `PostgreSQL` database.
|
||||||
|
|
||||||
<Aside>
|
<Aside>
|
||||||
If you installed Kekkai via Docker Compose,
|
If you installed Kekkai via `Docker Compose`,
|
||||||
then install it in the `database.host` value of `postgres`.
|
set it to `database.host` for postgres.
|
||||||
The rest of the data does not have to be filled in.
|
The password (database.password) should be the same as in `.env`,
|
||||||
They need to be filled in `.env`.
|
the rest of the data doesn't need to be filled in,
|
||||||
|
it should be in `.env`
|
||||||
|
|
||||||
What should it look like:
|
What should it look like:
|
||||||
```yaml
|
```hjson
|
||||||
database:
|
database:
|
||||||
|
{
|
||||||
...
|
...
|
||||||
host: 'postgres'
|
password: PASSWORD_FROM_ENV
|
||||||
|
host: postgres
|
||||||
...
|
...
|
||||||
|
}
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
</Aside>
|
</Aside>
|
||||||
|
@ -96,7 +123,7 @@ analytics:
|
||||||
plausible_api: 'https://plausible.io/api/event/'
|
plausible_api: 'https://plausible.io/api/event/'
|
||||||
plausible_domain: 'PLAUSIBLE_DOMAIN'
|
plausible_domain: 'PLAUSIBLE_DOMAIN'
|
||||||
plausible_token: 'PLAUSIBLE_TOKEN'
|
plausible_token: 'PLAUSIBLE_TOKEN'
|
||||||
work: true
|
enabled: true
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -107,7 +134,7 @@ analytics:
|
||||||
You can add the domain [here](https://plausible.io/sites/new?flow=provisioning).
|
You can add the domain [here](https://plausible.io/sites/new?flow=provisioning).
|
||||||
- `plausible_token`: Api token for authorization and sending requests.
|
- `plausible_token`: Api token for authorization and sending requests.
|
||||||
You can create it [here](https://plausible.io/settings/api-keys).
|
You can create it [here](https://plausible.io/settings/api-keys).
|
||||||
- `work`: Enable or disable analytics.
|
- `enabled`: Enable or disable analytics.
|
||||||
|
|
||||||
## Currency
|
## Currency
|
||||||
`DuckDuckGo` (fiat currency collection) and `CoinMarketCap` (cryptocurrency collection)
|
`DuckDuckGo` (fiat currency collection) and `CoinMarketCap` (cryptocurrency collection)
|
||||||
|
@ -116,25 +143,32 @@ are used to collect currency rates.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
...
|
...
|
||||||
currency:
|
currency:
|
||||||
chart:
|
{
|
||||||
save: false # Enable or disable saving graphs to an image (Boolean)
|
|
||||||
collecting:
|
collecting:
|
||||||
fiat: true # Turn off or turn on the collection of the fiat currency rate [Boolean]
|
{
|
||||||
|
fiat: true
|
||||||
crypto: false
|
crypto: false
|
||||||
schedule: '30 8 * * *' # Currency collection schedule in crontab format [String]
|
schedule: 30 8 * * *
|
||||||
crypto_apikey: 'APIKEY'
|
crypto_apikey: TOKEN
|
||||||
fiat: # List of fiat currency to save the exchange rate [Array]
|
}
|
||||||
- USD
|
fiat:
|
||||||
- RUB
|
[
|
||||||
- EUR
|
USD
|
||||||
- UAH
|
RUB
|
||||||
- TRY
|
EUR
|
||||||
- KZT
|
UAH
|
||||||
|
TRY
|
||||||
|
KZT
|
||||||
|
]
|
||||||
crypto:
|
crypto:
|
||||||
- ETH
|
[
|
||||||
- TON
|
ETH
|
||||||
- USDT
|
TON
|
||||||
|
USDT
|
||||||
|
BTC
|
||||||
|
]
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- `currency.chart.save`: Enable or disable saving graphs.
|
- `currency.chart.save`: Enable or disable saving graphs.
|
Loading…
Add table
Add a link
Reference in a new issue