Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 67 additions & 8 deletions docs/setup/operating-systems/linux-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,45 +79,50 @@ If `docker ps` does not yield any running containers, then continue on with the

Follow these instructions even if you do not have Docker installed, just to be sure that all traces of Docker are removed from your system to avoid interference later on.

`sudo apt-get remove docker docker-engine docker.io containerd runc`
`for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done`

It's ok if it reports that none of these packages are installed.

### Install Docker

1. `sudo apt-get install ca-certificates curl gnupg lsb-release`
1. `sudo apt-get install ca-certificates curl`

This installs packages needed for the actual installation step.

In order to install Docker, we need to add the package repository.

2. Add Docker's official GPG key:
`sudo mkdir -p /etc/apt/keyrings`
`curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg`
`sudo install -m 0755 -d /etc/apt/keyrings`
`sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc`
`sudo chmod a+r /etc/apt/keyrings/docker.asc`

3. Set up the repository:
`echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null`
`echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null`

4. Update the apt index
`sudo apt-get update`

5. Install Docker, Compose, and dependencies
`sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin`
`sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin`

### Running Docker without sudo

[Docker Docs Reference](https://docs.docker.com/engine/install/linux-postinstall)

In order to run Docker without sudo, we need to make sure the docker group is created and that the user is added to that group.

1. `sudo groupadd docker`
1. `sudo groupadd docker` (this might tell you that the group already exists; then just move on to the next step)
2. `sudo usermod -aG docker $USER`
3. Log out and back in to see the changes. If you are running a virtual machine, you may need to restart the virtual machine.
4. Make sure you can run docker without sudo: `docker ps`

## Set up the Discord bot

Please refer to the [Discord Bot Setup page](../discord/bot-creation/creation.md).
Complete the steps there and return back to this guide.

## Install and set up Zeppelin

Expand All @@ -127,6 +132,59 @@ Please refer to the [Discord Bot Setup page](../discord/bot-creation/creation.md

This creates a folder called Zeppelin and clones the bot code there.

### Needed and Optional Temporary Steps

Some of the steps are required, and some optional. Do both of the required steps, and the optional steps according to your need.

#### Using an Older Commit (required)

The latest commit (that was downloaded using the clone command above) does not currently run without errors. To get around this issue, a known working older commit will be used.

`git checkout b28ca17`

#### Rootrouter (required)

Needed for the bot to start correctly and the dashboard to load.

`nano Zeppelin/backend/src/api/start.ts`
Press Ctrl-W and type `initAuth` and press Enter.

In each of the 4 lines:
```
initAuth(app);
initGuildsAPI(app);
initArchives(app);
initDocs(app);
```

Change `app` to `rootRouter` so that it looks like this:

```
initAuth(rootRouter);
initGuildsAPI(rootRouter);
initArchives(rootRouter);
initDocs(rootRouter);
```

Press Ctrl-X, Y, and Enter to save and close.

#### Embeds in Tags

Tags in the current code are text only. In order to use embeds, some code needs to be changed.

`nano Zeppelin/backend/src/plugins/Tags/types.ts`

Look for `export const zTag = z.union([z.string(), zEmbedInput]);`

Change it to

```
const zEmbeds = z.object({ embeds: z.array(zEmbedInput) });
export const zTag = z.union([z.string(), zEmbeds]);
```

Press Ctrl-X, Y, and Enter to save and close.

### Configure Zeppelin

1. Enter the Zeppelin folder: `cd Zeppelin`
Expand Down Expand Up @@ -157,8 +215,9 @@ This creates a folder called Zeppelin and clones the bot code there.
- Get your Discord ID (an 18-20-digit number) and fill it in.
- If there will be multiple people managing the bot, separate the user IDs with commas.
- `DEFAULT_ALLOWED_SERVERS`: Normally servers need to be allowed before the bot can be added to it. Otherwise it leaves. This indicates the first server that the bot could be added to, where administrative commands can be run to allow other servers.
- This usually will not be the server with normal members where Zeppelin will be used, but some kind of test server first.
- Fill in the Discord server's ID.
- `PHISHERMAN_API_KEY`: Phisherman is a live database used for identifying malicious, scam, and phishing links. Uncomment the row if you have an api key.
- `PHISHERMAN_API_KEY`: Phisherman is a live database used for identifying malicious, scam, and phishing links. Uncomment the row if you have an api key and paste the api key at the end.
- DEVELOPMENT: Skip the entire section
- STANDALONE: Fill in this section unless you already have a MySQL database service set up that you would like to use with Zeppelin. If you don't know, you don't, and fill in this section.
- STANDALONE_WEB_PORT: Leave this alone unless port 80 on the host computer is already occupied. If it is, change it to something like 81 or 82. If you change this value, go back up to DASHBOARD_URL and API_URL and add a port after the domain or IP. For example: http://zeppelin.gg:81 or http://8.8.8.8:81 for the dashboard and http://zeppelin.gg:81/api or http://8.8.8.8:81/api for the api.
Expand Down