docs: Configuration of nginx.conf, config.yaml, and .env configs
Some checks are pending
Create and publish a Docker image / build-and-push-server (push) Waiting to run
Create and publish a Docker image / build-and-push-chart (push) Waiting to run
Create and publish a Docker image / build-and-push-CR (push) Waiting to run
Deploy docs / deploy (push) Waiting to run

This commit is contained in:
Данил 2024-10-31 00:44:06 +03:00
parent 1d0e77f755
commit a43230cd9e
4 changed files with 191 additions and 0 deletions

27
docs/config/conf-nginx.md Normal file
View file

@ -0,0 +1,27 @@
Kekkai is used by `Nginx` to redirect to the correct microservice.
## Change domain
Change localhost to your `domain` or `ipv4` based on your needs. If you need to use Kekkai locally, you don't need to change anything,
??? note
```
...
server_name localhost; # Your domain
...
```
## Change name for SSL
This is where the name of the SSL files changes. This needs to be edited if you have a different one
Change `privkey.pem` and `fullchain.pem` to the names of the files you have.
??? note
```
...
ssl_certificate /etc/nginx/ssl/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/privkey.pem;
...
```

24
docs/config/config-env.md Normal file
View file

@ -0,0 +1,24 @@
Kekkai can be configured using the `.env` file in the working directory. `.env.example`.
`.env` config is used to configure PosgreSQL running in Docker Compose.
!!! info
If you are not using Docker Compose, you do not need to edit this config
??? note "Example file `.env.example`"
```
# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
POSTGRES_PASSWORD=my_password
# If you do not know what you are doing, then you should not edit the values below
###################################################################################
POSTGRES_DB=kekkai
DB_HOST=postgres
POSTGRES_USER=postgres
```
This config only edits the password for PosgreSQL.
Please use only the characters `A-Za-z0-9`, without special characters or spaces

136
docs/config/config-yaml.md Normal file
View file

@ -0,0 +1,136 @@
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
crypto: false
schedule: '30 8 * * *'
fiat:
- USD
- RUB
- EUR
- UAH
- TRY
- KZT
crypto:
- BTC
- ETH
coinapiKeys: # List of keys for the coinapi API [Array]
- CryptoKey1
- CryptoKey2
- CryptoKey3
```
## 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 `CoinAPI` (cryptocurrency collection) are used to collect currency rates.
??? note
```yaml
...
currency:
chart:
save: false
collecting:
fiat: true
crypto: false
schedule: '30 8 * * *'
fiat:
- USD
- RUB
- EUR
- UAH
- TRY
- KZT
crypto:
- BTC
- ETH
coinapiKeys:
- CryptoKey1
- CryptoKey2
- CryptoKey3
...
```
- `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`).
- `currency.fiat`: A list of fiat currencies that will be saved to the database.
- `currency.crypto`: A list of cryptocurrencies that will be saved to the database.
- `currency.coinapiKeys`: List of API keys of the coinapi service

View file

@ -16,6 +16,10 @@ nav:
- Contributing: getting-started/contributing.md
- Config:
- How to create API keys for coinapi: config/coinapi-keys.md
- Configure config.yaml: config/config-yaml.md
- Configure .env: config/config-env.md
- Configure nginx.conf: config/conf-nginx.md
theme:
language: en
name: material