Skip to content

Commit

Permalink
feat: add automatic plan integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Silthus committed Feb 2, 2021
1 parent 35cc504 commit 41c246f
Show file tree
Hide file tree
Showing 5 changed files with 433 additions and 7 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Use this repository to quickstart your own Minecraft server network using docker
* [Adding more servers](#adding-more-servers)
* [Database](#database)
* [Dynmap](#dynmap)
* [Player Analytics](#player-analytics)
* [Backup](#backup)
* [Web Traefik](#web-traefik)
* [Developer Setup](#developer-setup)
Expand All @@ -27,7 +28,8 @@ Use this repository to quickstart your own Minecraft server network using docker

* Full minecraft network setup using latest [paper-spigot](https://papermc.io/) and [waterfall](https://github.com/PaperMC/Waterfall) builds.
*Using other distrubutions, like forge, sponge or veolicty is completly up to you. Just edit the `globals.env`*
* Up and running standalone dynmap configuration with custom subdomain.
* Up and running standalone [dynmap](https://www.spigotmc.org/resources/dynmap.274/) configuration with custom subdomain.
* Ready to use [Player Analytics (Plan)](https://www.spigotmc.org/resources/plan-player-analytics.32536/) integration with custom subdomain.
* Usage of the [official minecraft docker](https://github.com/itzg/docker-minecraft-server) images from itzg with all config options.
* Integrated [MariaDB](https://hub.docker.com/_/mariadb) database with not exposed public port for enhanced security.
* [phpMyAdmin](https://hub.docker.com/r/phpmyadmin/phpmyadmin/) for accessing the database.
Expand Down Expand Up @@ -152,7 +154,11 @@ There is also a phpyMyAdmin deployment available under `db.your-server.net`. You

The stack will be deploy with a standalone dynmap webserver and dynmap has to be configured accordingly. To make things easier this template comes with a dynmap `configuration.txt` and preconfigured web directory that works out of the box.

The dynmap can be accessed using `https://map.your-server.net` and is secured with a lets-encrypt certificate by default.
To enable the dynmap integration download the [dynmap plugin](https://www.spigotmc.org/resources/dynmap.274/) and drop it into the `plugins/` directory. The dynmap can then be accessed using `https://map.your-server.net`.

## Player Analytics

Download the[player analytics](https://www.spigotmc.org/resources/plan-player-analytics.32536/) plugin drop it into the `plugins/` and `proxy-plugins/` directory. Restart your server and access PLAN under `plan.your-server.net`.

## Backup

Expand Down
8 changes: 4 additions & 4 deletions docker-compose.download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ services:
- "./downloads/files:/files"
- "./downloads/conf:/etc/nginx/conf.d"
labels:
- traefik.http.routers.downloads.rule=Host(`dl.raid-craft.de`)
- traefik.http.routers.downloads.entrypoints=websecure
- traefik.http.routers.downloads.tls.certresolver=myresolver
- traefik.http.routers.downloads.tls=true
- traefik.http.routers.downloads-${ENVIRONMENT}.rule=Host(`dl.${WEB_BASE_URL}`)
- traefik.http.routers.downloads-${ENVIRONMENT}.entrypoints=websecure
- traefik.http.routers.downloads-${ENVIRONMENT}.tls.certresolver=myresolver
- traefik.http.routers.downloads-${ENVIRONMENT}.tls=true
- traefik.docker.network=minecraft
networks:
- minecraft
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ services:
CFG_BASE_URL: ${WEB_BASE_URL}
ports:
- ${PROXY_PORT:-25565}:25577/tcp
- 8192:8192/tcp
- ${PROXY_PORT:-25565}:25577/udp
# enable to forward votifier
# - 8192:8192/tcp
volumes:
- ./configs/proxy:/config:z
- ./servers/proxy:/server:z
Expand Down
222 changes: 222 additions & 0 deletions plugins/Plan/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,222 @@
# -----------------------------------------------------
# Plan Bukkit Configuration file
# More information about each setting:
# https://github.com/Rsl1122/Plan-PlayerAnalytics/wiki/Bukkit-Configuration
# -----------------------------------------------------
Server:
ServerName: ${CFG_SERVER_NAME}
# -----------------------------------------------------
Plugin:
Logging:
# More information about Locale
# https://github.com/Rsl1122/Plan-PlayerAnalytics/wiki/Localization
Locale: default
Create_new_locale_file_on_next_enable: false
Debug: false
Dev: false
Delete_logs_after_days: 7
Update_notifications:
# Display update notification on the website
Check_for_updates: true
Notify_about_DEV_releases: false
Configuration:
Allow_proxy_to_manage_settings: true
# -----------------------------------------------------
# Supported databases: SQLite, H2, MySQL
# -----------------------------------------------------
Database:
Type: MySQL
MySQL:
Host: ${CFG_DB_HOST}
Port: ${CFG_DB_PORT}
User: ${CFG_DB_USER}
Password: ${CFG_DB_PASSWORD}
Database: ${CFG_DB_NAME}
# Launch options to append after mysql driver address
Launch_options: "?rewriteBatchedStatements=true&useSSL=false&serverTimezone=UTC+1"
H2:
User: root
Password: minecraft
# -----------------------------------------------------
# More information about SSL Certificate Settings:
# https://github.com/Rsl1122/Plan-PlayerAnalytics/wiki/SSL-Certificate-%28HTTPS%29-Set-Up
# -----------------------------------------------------
Webserver:
Port: 8804
Alternative_IP: false
# %port% is replaced automatically with Webserver.Port
Address: your.domain.here:%port%
# InternalIP usually does not need to be changed, only change it if you know what you're doing!
# 0.0.0.0 allocates Internal (local) IP automatically for the WebServer.
Internal_IP: 0.0.0.0
Security:
SSL_certificate:
KeyStore_path: Cert.jks
Key_pass: default
Store_pass: default
Alias: alias
# HTTPS is required for Login.
Disable_authentication: false
# Cross-Origin Resource Sharing (Requests from non-Plan web pages)
# https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
CORS:
Allow_origin: "*"
IP_whitelist: false
Whitelist:
- "192.168.0.0"
- "0:0:0:0:0:0:0:1"
Disable_Webserver: true
External_Webserver_address: https://www.example.address
# -----------------------------------------------------
Data_gathering:
Geolocations: true
# Please accept the EULA to download GeoLite2 IP-Country Database
# https://www.maxmind.com/en/geolite2/eula
Accept_GeoLite2_EULA: true
Ping: true
Disk_space: true
Commands:
Log_unknown: false
Log_aliases_as_main_command: true
# -----------------------------------------------------
# Supported time units: MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS
# -----------------------------------------------------
Time:
Delays:
Ping_server_enable_delay: 300
Unit: SECONDS
Ping_player_join_delay: 30
Unit: SECONDS
Wait_for_DB_Transactions_on_disable: 20
Unit: SECONDS
Thresholds:
# How long player needs to be idle until Plan considers them AFK
AFK_threshold: 3
Unit: MINUTES
# Activity Index considers last 3 weeks and uses these thresholds in the calculation
# The index is a number from 0 to 5.
# These numbers were calibrated with data of 250 players (Small sample size).
Activity_index:
Playtime_threshold: 30
Unit: MINUTES
Remove_inactive_player_data_after: 180
Unit: DAYS
# Includes players online, tps and performance time series
Remove_time_series_data_after: 90
Unit: DAYS
Remove_ping_data_after: 14
Unit: DAYS
Remove_disabled_extension_data_after: 2
Unit: DAYS
Periodic_tasks:
Extension_data_refresh_every: 1
Unit: HOURS
Check_DB_for_server_config_files_every: 1
Unit: MINUTES
Clean_Database_every: 1
Unit: HOURS
# -----------------------------------------------------
Display_options:
# More information about Themes:
# https://github.com/Rsl1122/Plan-PlayerAnalytics/wiki/Themes
Theme: default
Sessions:
Show_on_page: 50
# By Default World playtime pie is ordered alphabetically.
# Colors will be determined alphabetically in any case.
Order_world_pies_by_percentage: false
Players_table:
Show_on_server_page: 2500
Show_on_players_page: 25000
Open_player_links_in_new_tab: false
Graphs:
Show_gaps_in_data: false
TPS:
High_threshold: 18
Medium_threshold: 10
Disk_space:
High_threshold: 500
Medium_threshold: 100
Command_colors:
Main: '&2'
Secondary: '&7'
Highlight: '&f'
# -----------------------------------------------------
Formatting:
Decimal_points: '#.##'
Time_amount:
Year: '1 year, '
Years: '%years% years, '
Month: '1 month, '
Months: '%months% months, '
Day: '1d '
Days: '%days%d '
Hours: '%hours%h '
Minutes: '%minutes%m '
Seconds: %seconds%s
Zero: 0s
# Dates settings use Java SimpleDateFormat.
# You can find the patterns & examples here:
# https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
Dates:
# Show_recent_day_names replaces day number with Today, Yesterday, Wednesday etc.
Show_recent_day_names: true
# Non-regex pattern to replace
DatePattern: 'MMM d YYYY'
Full: 'MMM d YYYY, HH:mm:ss'
NoSeconds: 'MMM d YYYY, HH:mm'
JustClock: HH:mm:ss
# TimeZone Option uses format 'GMT+2' or 'GMT-04:30'
# Other valid options are 'server' and 'UTC'
TimeZone: 'server'
# -----------------------------------------------------
# World aliases can be used to rename worlds and to combine multiple worlds into a group.
# -----------------------------------------------------
World_aliases:
world: world
# -----------------------------------------------------
# These settings will make Plan write .js, .css, .json and .html files to some location on disk.
# Relative path will render to /plugins/Plan/path
# Make sure user running the server has write permissions to the path.
# On networks export is disabled on Bukkit/Sponge servers.
# -----------------------------------------------------
Export:
HTML_Export_path: 'Analysis Results'
JSON_Export_path: 'Raw JSON'
Parts:
# Player pages/JSON are only written on join/leave.
Player_pages: false
Player_JSON: false
Players_page: false
Server_page: false
Server_JSON: false
# All player pages/JSON can be exported by using /plan m export players
Export_player_on_login_and_logout: false
# If there are multiple servers the period is divided evenly to avoid export of all servers at once
# Also affects Players page export
Server_refresh_period: 20
Unit: MINUTES
# -----------------------------------------------------
# These settings affect Plugin data integration.
# If a plugin is causing issues the integration can be disabled by setting Plugin_name.Enabled: false
# -----------------------------------------------------
Plugins:
Buycraft:
# http://help.buycraft.net/article/36-where-to-find-the-secret-key
Secret: '-'
Economy (Vault):
Enabled: true
Essentials:
Enabled: true
Factions:
HideFactions:
- ExampleFaction
LuckPerms:
Enabled: true
Permission Groups (Vault):
Enabled: true
Towny:
HideTowns:
- ExampleTown
mcMMO:
Enabled: true
Loading

0 comments on commit 41c246f

Please sign in to comment.