GitXplorerGitXplorer
k

ovh-auto-buy

public
11 stars
9 forks
0 issues

Commits

List of commits on branch main.
Unverified
67d4bebf8c5ff118d150d2a20ef75cce8f1a6b94

ci: automatically build and push to docker hub when updated

kkatorly committed 2 months ago
Unverified
1ba26c072dec13e2a117d0304b0fe5dbca0759e1

feat: add option to set frequency

kkatorly committed 2 months ago
Unverified
0f03c000bd8ff0217243e3349452fe6e3c02eedd

feat: docker image for go-auto-buy-ovh

kkatorly committed 2 months ago
Verified
313180171c35433b454d09f3d2e5c4d1f50b43f5

Initial commit

kkatorly committed 2 months ago

README

The README file for this repository.

Automatically buys OVH Eco Servers (Docker)

Go source code modified from: https://blog.yessure.org/index.php/archives/203

To generate token:

  • IE: https://eu.api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*
  • CA: https://ca.api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*

To get Eco planCode and options:

Docker

docker run -e APP_KEY="ovh_appkey" \
           -e APP_SECRET="ovh_appsecret" \
           -e CONSUMER_KEY="ovh_consumerkey" \
           -e REGION="ovh_region" \
           -e TG_TOKEN="telegram_bot_token" \
           -e TG_CHATID="telegram_your_chatid" \
           -e ZONE="ovh_zone" \
           -e PLANCODE="product_plancode" \
           -e OPTIONS="product_options" \
           -e AUTOPAY=true \
           -e FREQUENCY=5 \
           katorly/ovh-auto-buy:latest

docker-compose.yml

services:
  auto-buy:
    image: katorly/ovh-auto-buy:latest
    container_name: ks-buy
    environment:
      APP_KEY: "ovh_appkey"             # OVH的应用key
      APP_SECRET: "ovh_appsecret"       # OVH的应用secret
      CONSUMER_KEY: "ovh_consumerkey"   # OVH的消费者key
      REGION: "ovh_region"              # 区域设置为, e.g. ovh-eu
      TG_TOKEN: "telegram_bot_token"    # 你的Telegram Bot Token
      TG_CHATID: "telegram_your_chatid" # 你希望发送消息的Telegram Chat ID
      ZONE: "ovh_zone"                  # OVH子公司区域设置, e.g. IE
      PLANCODE: "product_plancode"      # 需要购买的产品的planCode, e.g. 25skleb01
      OPTIONS: "product_options"        # 选择的配置, e.g. bandwidth-300-25skle,ram-32g-ecc-2400-25skle,softraid-2x450nvme-25skle
      AUTOPAY: true                     # 是否自动支付, e.g. true
      FREQUENCY: 5                      # 检查频率单位为秒, e.g. 5