Skip to content

Commit

Permalink
Write the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eartharoid committed Jan 9, 2021
1 parent 7c53209 commit 395b377
Show file tree
Hide file tree
Showing 10 changed files with 495 additions and 33 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
![GitHub Repo stars](https://img.shields.io/github/stars/Left4Craft/spigot-updater?style=for-the-badge)
![GitHub deployments](https://img.shields.io/github/deployments/Left4Craft/spigot-updater/github-pages?label=GitHub%20Pages&style=for-the-badge)
![GitHub top language](https://img.shields.io/github/languages/top/Left4Craft/spigot-updater?color=yellow&style=for-the-badge)
![GitHub package.json version](https://img.shields.io/github/package-json/v/Left4Craft/spigot-updater?style=for-the-badge)
![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/Left4Craft/spigot-updater?include_prereleases&style=for-the-badge)
![GitHub](https://img.shields.io/github/license/Left4Craft/spigot-updater?style=for-the-badge)
<!-- ![GitHub package.json version](https://img.shields.io/github/package-json/v/Left4Craft/spigot-updater?style=for-the-badge) -->

# Spigot updater

**An automated update system for Pterodactyl Minecraft servers and their plugins.**

Originally made for [Left4Craft](https://www.left4craft.org), this tool integrates with Discord, Pterodactyl, and various other APIs to keep your servers and their plugins up to date with minimal input from owners and admins.

## What it does

This periodically checks your servers and plugins for updates and alerts you through Discord when when it finds a new version. You will be prompted to approve updates and are usually given links to the build/version's changelog.
Expand All @@ -24,6 +27,8 @@ You can choose between PaperMC or the ServerJars API for your servers.

Plugins can be sourced from GitHub Releases, a Jenkins build server, or SpigotMC.

The server is automatically stopped before and started after uploading, to avoid corruption.

## Limitations

- You can't update a plugin on some servers and not others (except if you have servers with different Minecraft versions, you could have multiple plugins from the same source).
Expand All @@ -34,4 +39,8 @@ Visit [the docs](https://left4craft.github.io/spigot-updater/) for installation,

## Support

[![Discord server](https://discordapp.com/api/guilds/424571587413540874/widget.png?style=banner2)](https://discord.left4craft.org)
[![Discord server](https://discordapp.com/api/guilds/424571587413540874/widget.png?style=banner2)](https://discord.left4craft.org)

## Donate

Sponsor this project at [left4craft.org/shop](https:/www.left4craft.org/shop).
7 changes: 6 additions & 1 deletion docs/configuration/.pages
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
title: Configuration
title: Configuration
arrange:
- env.md
- config.md
- servers.md
- plugins.md
112 changes: 87 additions & 25 deletions docs/configuration/config.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,89 @@
# Config

## papermc (recommended)

Supports **major versions only** (`1.15`, `1.16` etc)

- `waterfall`
- `paper`
- `taverntine`

## serverjars

Supports minor versions (`1.16.1`, `1.16.2` etc) and `latest`.

- `nukkitx`
- `pocketmine`
- `magma`
- `mohist`
- `travertine`
- `bungeecord`
- `velocity`
- `waterfall`
- `bukkit`
- `paper`
- `spigot`
- `snapshot`
- `vanilla`
The general configuration file, [`config/config.js`](https://github.com/Left4Craft/spigot-updater/blob/master/config/config.js).

## Options

??? summary "server"
### server_name

The name of your Minecraft server.

??? summary "color"
### color

Your primary colour, used in Discord message embeds.

??? summary "channel_id"
### channel_id

The ID of a channel in your Discord server that will be used for update messages. Only admins should have access to this channel.

??? summary "server_jars_api"
### server_jars_api

The API you want to use to get updates and downloads for server jars (spigot, paper, bungeecord, etc).

=== "papermc (recommended)"
Supports **major versions only** (`1.15`, `1.16` etc)

- `waterfall`
- `paper`
- `taverntine`

=== "serverjars"
Supports minor versions (`1.16.1`, `1.16.2` etc) and `latest`.

- `nukkitx`
- `pocketmine`
- `magma`
- `mohist`
- `travertine`
- `bungeecord`
- `velocity`
- `waterfall`
- `bukkit`
- `paper`
- `spigot`
- `snapshot`
- `vanilla`

??? summary "left4status"
### left4status

:octicons-info-24: Optional
{ : .details }

Used for getting the server count if a server has the `left4status` property and not the `host` property. Must be an instance of [Left4Status](https://github.com/Left4Craft/Left4Status).

??? summary "headless_browser"
### headless_browser

:octicons-milestone-24: Default: `true`
{ : .details }

Whether or not the SpigotMC browser should run in headless mode.

??? summary "download_time"
### download_time

:octicons-milestone-24: Default: `10000`
{ : .details }

Number of milliseconds to wait for plugins to download from SpigotMC. Include at least an additional 5 seconds (5000) for Cloudflare. 10 seconds should be ok for fast connections.

??? summary "save_logs"
### save_logs

:octicons-milestone-24: Default: `true`
{ : .details }

Save log files to `logs/`?

??? summary "debug"
### debug

:octicons-milestone-24: Default: `false`
{ : .details }

Enable additional debug logging?
76 changes: 75 additions & 1 deletion docs/configuration/env.md
Original file line number Diff line number Diff line change
@@ -1 +1,75 @@
# ENV
# ENV

Rename `example.env` to `.env`.

It should look like this:

```env
DISCORD_TOKEN=
DB_HOST=
DB_USER=
DB_PASS=
DB_NAME=
PTERO_HOST=
PTERO_CLIENT_KEY=
SPIGOT_EMAIL=
SPIGOT_PASSWORD=
```

## Options

??? summary "DISCORD_TOKEN"
### DISCORD_TOKEN

Create a new bot application on the [Discord Developer Portal](https://discord.com/developers/applications) and copy the token.

??? summary "DB_HOST"
### DB_HOST

You need to create a MySQL or MariaDB database. You **don't** need to create any tables, it will be done automatically. For a non-standard port, append `:port` (eg: `127.0.0.1:3306`)

??? summary "DB_USER"
### DB_USER

The database username.

??? summary "DB_PASS"
### DB_PASS

The database password.

??? summary "DB_NAME"
### DB_NAME

The name of the database.

??? summary "PTERO_HOST"
### PTERO_HOST

The address for your Pterodactyl installation - eg: `https://panel.example.org`

??? summary "PTERO_CLIENT_KEY"
### PTERO_CLIENT_KEY

Create a new API key at `/account/api` (panel.example.org/account/api)

??? summary "SPIGOT_EMAIL"
### SPIGOT_EMAIL

:octicons-info-24: Optional
{: .details }

Only required if you have premium plugins. The email address for your SpigotMC account.

??? summary "SPIGOT_PASSWORD"
### SPIGOT_PASSWORD

:octicons-info-24: Optional
{: .details }

Only required if you have premium plugins. The password for your SpigotMC account.

2FA is not supported.
Loading

0 comments on commit 395b377

Please sign in to comment.