From 6e8921d3fec2439eb9b11adbc5dc8bac2f16101f Mon Sep 17 00:00:00 2001 From: Redume Date: Sun, 23 Feb 2025 22:40:52 +0300 Subject: [PATCH] docs: Wrote a page to deploy the project via docker --- docs/astro.config.mjs | 11 ++- .../content/docs/getting-started/docker.mdx | 86 +++++++++++++++++++ 2 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 docs/src/content/docs/getting-started/docker.mdx diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index af800d2..91ceb17 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -10,7 +10,16 @@ export default defineConfig({ social: { github: 'https://github.com/redume/kekkai', }, - sidebar: [], + sidebar: [ + { + label: 'Getting started', + items: [ + { + label: 'Docker', slug: 'getting-started/docker', badge: 'recommended' + } + ], + }, + ], }), ], }); diff --git a/docs/src/content/docs/getting-started/docker.mdx b/docs/src/content/docs/getting-started/docker.mdx new file mode 100644 index 0000000..4562edd --- /dev/null +++ b/docs/src/content/docs/getting-started/docker.mdx @@ -0,0 +1,86 @@ +--- +title: Docker +--- + +Docker Compose is the recommended method to run Kekkai in production. +Below are the steps to deploy Kekkai with Docker Compose. + +Kekkai requires Docker Compose version 2.x. + +import { Steps } from '@astrojs/starlight/components'; +import { Code } from '@astrojs/starlight/components'; + + + +1. Preparing files + ``` + git clone https://github.com/redume/Kekkai + ``` + ``` + cd Kekkai + ``` + +2. Change config files + + In nginx.conf, you need to specify your domain or ipv4 address + + + + To set up SSL. Create folder `CertSSL` + ``` + 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` + + + + + Fill in the data in the database item, as well as in the .env config + + + + + - Populate custom database information if necessary. + - 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`. + +3. Start the containers + ```shell + docker compose up -d + ``` + + \ No newline at end of file