Skip to content

Commit 6154f92

Browse files
committed
add docs
1 parent 6955527 commit 6154f92

File tree

3 files changed

+103
-0
lines changed

3 files changed

+103
-0
lines changed

docs/deployment/docker.rst

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
======
2+
Docker
3+
======
4+
5+
.. warning::
6+
7+
This method of deployment is only for internal use within the transprogrammer community.
8+
In addition, this deployment method is fairly advanced. This guide is only intended for internal
9+
documentation for possible deployment options.
10+
11+
Docker Compose can be used to run an Rodhaj instance in production. This will only work if you have access to the
12+
Rodhaj Docker images.
13+
14+
Step 1 - Download required files
15+
================================
16+
17+
Create a directory (e.g. ``./rodhaj``), which will hold all of the required files.
18+
19+
.. code-block:: bash
20+
21+
mkdir ./rodhaj
22+
cd ./rodhaj
23+
24+
Download ``docker-compose.yml``, ``config.yml``, and ``example.env`` using the following commands:
25+
26+
.. code-block:: bash
27+
28+
wget -O docker-compose.yml https://github.com/transprogrammer/rodhaj/releases/latest/download/docker-compose.yml \
29+
&& wget -O config.yml https://github.com/transprogrammer/rodhaj/releases/latest/download/config-example.yml \
30+
&& wget -O .env https://github.com/transprogrammer/rodhaj/releases/latest/download/example.env
31+
32+
.. note::
33+
34+
Optionally, if you desired a full production version, then use the following commands to download
35+
``docker-compose.prod.yml``, ``example.env``, and ``prometheus.yml``:
36+
37+
.. code-block:: bash
38+
39+
wget -O docker-compose.yml https://raw.githubusercontent.com/transprogrammer/rodhaj/main/docker/docker-compose.prod.yml \
40+
&& wget -O prometheus.yml https://raw.githubusercontent.com/transprogrammer/rodhaj/main/docker/prometheus.yml \
41+
&& wget -O .env https://github.com/transprogrammer/rodhaj/releases/latest/download/example.env
42+
43+
Step 2 - Populate ``.env`` and ``config.yml`` file with values
44+
==============================================================
45+
46+
- Change ``DB_PASSWORD`` to a randomly generated password.
47+
- Provide Rodhaj's bot token in ``config.yml``
48+
- Change ``rodhaj.guild_id`` in ``config.yml`` to the server ID that Rodhaj is running on
49+
- Modify the PostgreSQL URI used in ``config.yml`` to redirect to the database container and appropriate password
50+
51+
.. note::
52+
53+
In order for Rodhaj to work container-wise, the IP aliases that is provided by the compose file
54+
must be used instead. For example, the URI would look like this (of course replace the password):
55+
56+
.. code-block::
57+
58+
postgresql://postgres:somepwd@database:5432/rodhaj
59+
60+
.. important::
61+
62+
If you are running the full production version, please enable the Prometheus metrics
63+
found in Rodhaj's configuration
64+
65+
Step 3 - Start all containers
66+
=============================
67+
68+
Assume that you are in the directory created in Step 1, run the following command to bring up Rodhaj entirely.
69+
70+
.. code-block::
71+
72+
docker compose up -d
73+
74+
.. tip::
75+
76+
If you are having issues downloading container images, you will need to authenticate to the Github Container
77+
Registry. Steps can be found `here <https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry>`_.
78+
79+
Step 4 - Upgrading
80+
==================
81+
82+
.. danger::
83+
84+
Although Rodhaj doesn't often update version-wise, there
85+
may be breaking changes between versions. Be careful and be
86+
up-to-date with changes.
87+
88+
Upgrading Rodhaj is very simple. All you need to do is run the following commands below:
89+
90+
.. code-block:: bash
91+
92+
docker compose pull && docker compose up -d

docs/deployment/index.rst

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
================
2+
Deployment Guide
3+
================
4+
5+
This document represents the deployment guide for Rodhaj. Currently, these are the officially supported methods as shown below.
6+
7+
.. toctree::
8+
:maxdepth: 1
9+
10+
docker

docs/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Rodhaj
1111
:hidden:
1212
:caption: Guides
1313

14+
deployment/index
1415
user-guide/index
1516
dev-guide/index
1617

0 commit comments

Comments
 (0)