2025-01-17 15:49:28 +03:00
|
|
|
Docker Compose is the recommended method to run Kekkai in production.
|
|
|
|
Below are the steps to deploy Kekkai with Docker Compose.
|
2024-10-24 19:27:47 +03:00
|
|
|
|
|
|
|
Kekkai requires Docker Compose version 2.x.
|
|
|
|
|
|
|
|
### Steps 1 - Preparing files
|
|
|
|
```shell
|
|
|
|
git clone https://github.com/Redume/Kekkai.git
|
|
|
|
```
|
|
|
|
|
|
|
|
```shell
|
|
|
|
cd Kekkai
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### Steps 2 - Change config files
|
|
|
|
??? note "Nginx Configuration"
|
|
|
|
In `nginx.conf`, you need to specify your domain or ipv4 address
|
|
|
|
```
|
|
|
|
...
|
|
|
|
listen 443 ssl;
|
|
|
|
server_name localhost; # Your domain
|
|
|
|
...
|
|
|
|
```
|
|
|
|
|
|
|
|
To set up SSL
|
|
|
|
```bash
|
|
|
|
mkdir CertSLL
|
|
|
|
```
|
|
|
|
|
|
|
|
After that, copy the SSL certificates to the `CertSSL` folder, if the names are different,
|
|
|
|
then change either the name of the certificates or in `nginx.conf`
|
|
|
|
|
|
|
|
```
|
|
|
|
ssl_certificate /etc/nginx/ssl/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/nginx/ssl/privkey.pem;
|
|
|
|
```
|
|
|
|
|
2024-10-30 22:12:36 +03:00
|
|
|
??? note "The main config is `config.sample.yaml` for Kekkai"
|
2024-10-24 19:27:47 +03:00
|
|
|
```yaml
|
|
|
|
database:
|
|
|
|
user: 'DATABASE_USERNAME'
|
|
|
|
password: 'DATABASE_PASSWORD'
|
|
|
|
host: 'DATABASE_HOST'
|
|
|
|
name: 'DATABASE_NAME'
|
|
|
|
port: 5432
|
|
|
|
...
|
|
|
|
```
|
|
|
|
|
|
|
|
Fill in the data in the `database` item, as well as in the `.env` config
|
|
|
|
|
|
|
|
|
2024-10-30 22:12:36 +03:00
|
|
|
??? note "`.env.sample` config for PostgreSQL"
|
2024-10-24 19:27:47 +03:00
|
|
|
```.env
|
|
|
|
# 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
|
|
|
|
```
|
|
|
|
|
|
|
|
- Populate custom database information if necessary.
|
2025-01-17 15:49:28 +03:00
|
|
|
- Consider changing `DB_PASSWORD` to a custom value.
|
|
|
|
Postgres is not publically exposed, so this password is only used for - local authentication.
|
|
|
|
To avoid issues with Docker parsing this value, it is best to use only the characters `A-Za-z0-9`.
|
2024-10-24 19:27:47 +03:00
|
|
|
|
|
|
|
!!! note
|
2024-10-30 22:12:36 +03:00
|
|
|
After editing, rename the config files by removing `.sample` in the name
|
2024-10-24 19:27:47 +03:00
|
|
|
|
|
|
|
|
|
|
|
### Steps 3 - Start the containers
|
|
|
|
```shell title='Start the containers using docker compose command'
|
|
|
|
docker compose -f "docker-compose.yaml" up -d --build
|
|
|
|
```
|