Skip to content

Repository files navigation

CherryServersTrafficBuyer

CherryServersTrafficBuyer. It does what it says on the tin.

CherryServersTrafficBuyer automatically monitor's your Cherry Servers project's traffic usage at a provided interval. When CherryServersTrafficBuyer detects that your traffic usage has exceeded a provided threshold, more traffic will be purchased automatically.

Disclaimer

This is a beta project. Before using, please carefully read the Cherry Servers API Documentation and the source code for this project, then decide whether using this project is right for you. Contributors to this project are not responsible for any unexpected behaviors, including (but not limited to) inappropriate use of Cherry Servers credit.

Quick Start Guide

This project is intended to be used in a Docker container, although you may run it outside of a container if you wish.

Environment Variables

There are several evironment variables you must configure.

  • API_KEY The API key, which can be generated from the Cherry Servers Client Portal
  • PROJECT_ID The Project ID of your Cherry Servers project
  • TRAFFIC_THRESHOLD_PERCENT The percentage of traffic used after which more traffic should be purchased (Default 90 if unspecified)
  • REFRESH_INTERVAL_MINUTES The interval (in minutes) at which traffic usage should be checked (Default 65 if unspecified)

Note: At this time, CherryServersTrafficBuyer has no cooldown for purchasing new traffic besides the REFRESH_INTERVAL_MINUTES environment variable. Therefore, it is wise to keep this number somewhat high to reduce the risk of duplicate purchases.

Example docker-compose.yml

services:
  cherryserverstrafficbuyer:
    image: ghcr.io/blake502/cherryserverstrafficbuyer:latest
    container_name: cherryserverstrafficbuyer
    restart: unless-stopped
    environment:
      - API_KEY=2bv80ye20vbakjs3...
      - PROJECT_ID=69420
      - TRAFFIC_THRESHOLD_PERCENT=90
      - REFRESH_INTERVAL_MINUTES=65

About

Automatically buy more traffic from Cherry Servers when you approach your limit

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages