Skip to content

Commit fe0aadd

Browse files
electron271anemoijereja-eden
authored andcommitted
docs: add self-hosting guide for Tux with Docker and Postgres
1 parent 7e99f5c commit fe0aadd

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

docs/self-hosting.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Getting started with self-hosting Tux
2+
> [!WARNING]
3+
> This guide is for Docker with Docker Compose. This also assumes you have a working Postgres database. If you don't have one, you can use [Supabase](https://supabase.io/).
4+
5+
## Prerequisites
6+
- Docker and Docker Compose
7+
- A working Postgres database and the url in the format `postgres://postgres.user:password@url (if supabase use pooler url):5432/postgres`
8+
- Discord bot token with intents enabled
9+
- Sentry URL for error tracking (optional)
10+
11+
## Steps to Install
12+
1. Clone the repository
13+
14+
```bash
15+
git clone https://github.com/allthingslinux/tux && cd tux
16+
```
17+
18+
2. Copy the `.env.example` file to `.env` and fill in the required values.
19+
20+
3. Copy the `config/settings.yml.example` file to `config/settings.yml` and fill in the required values.
21+
22+
4. Start the bot
23+
24+
```bash
25+
docker-compose up -d
26+
```
27+
28+
> [!NOTE]
29+
> Add `--build` to the command if you want to use your local changes.
30+
31+
5. Check the logs to see if the bot is running
32+
33+
```bash
34+
docker-compose logs
35+
```
36+
37+
6. Push the database schema
38+
39+
```bash
40+
docker-compose exec tux prisma db push
41+
```
42+
43+
> [!NOTE]
44+
> If this gets stuck your database URL is most likely incorrect. Please check the URL (port as well, port is usually 5432). You should give the command 30 seconds to run before you assume it's stuck.
45+
46+
7. Run `(prefix)help` in your server to see if the bot is running. If it is, now you can start configuring the bot.
47+

0 commit comments

Comments
 (0)