Skip to content

Commit

Permalink
feat: 🎸 添加radiance-bot
Browse files Browse the repository at this point in the history
  • Loading branch information
monlor committed Jun 22, 2024
1 parent 1575f8c commit 9a0e368
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-image-manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
- bepusdt
- http-dump
- kubectl
- xiaoya
- radiance-bot
tag:
description: 'Image tag'

Expand Down
14 changes: 14 additions & 0 deletions radiance-bot/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM amazoncorretto:17-alpine

WORKDIR /app

RUN apk add --no-cache curl bash

RUN curl -LO https://gh.monlor.com/https://github.com/semicons/java_oci_manage/releases/latest/download/gz_client_bot.tar.gz && \
tar -xvf gz_client_bot.tar.gz && \
chmod +x sh_client_bot.sh && \
rm gz_client_bot.tar.gz

COPY --chmod=755 entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
26 changes: 26 additions & 0 deletions radiance-bot/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## 项目

radiance-bot,oracle抢机

## 安装

#### 环境变量

获取用户信息:https://t.me/radiance_helper_bot

* TG_BOT_USERNME
* TG_BOT_PASSWORD

### 映射配置文件

* `/app/oracle_config`: oracle配置
* `/app/azure_config`: azure配置

### 映射key

* `/app/oracle.key`
* `/app/azure.key`

## 参考

https://github.com/semicons/java_oci_manage/blob/main/md/install.md
47 changes: 47 additions & 0 deletions radiance-bot/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/sh

set -eu

cat > /app/client_config <<-EOF
#在oci=begin和oci=end之间放入你的API配置信息 支持多个配置文件 机器人操作profile管理里可更换操作账户
oci=begin
$(cat /app/oracle_config 2> /dev/null)
oci=end
#用户信息 从 https://t.me/radiance_helper_bot 配置(bot可使用/raninfo命令随机生成)
#必传
username=${TG_BOT_USERNME}
#必传
password=${TG_BOT_PASSWORD}
#cloudflare 功能参数 非必传
#非必传 cloudflare邮箱
cf_email=
#非必传 cloudflare key 在我的个人资料->API令牌处->API密钥->Global API Key 获取
cf_account_key=
#非必填 本机ip和端口号 (进阶玩家选项 可填写域名) 不写将自动获取本机ip 并使用默认端口号9527 (小白用户建议不填) 如填写 格式为:https://xxx.xx:9527
local_address=
#非必填 url名称(默认为address 可在bot上修改)
local_url_name=
#非必填 启动模式 填写local为启动本地无公网IP模式(只要能联网即可) 不填或填其他 则启动端口模式
model=local
#在azure=begin和azure=end之间放入你的azure的API配置信息 支持多个配置文件 机器人切换profile可更换操作配置 上传配置支持使用原格式({"appId":"xxx","password":"xxx"...})上传
azure=begin
$(cat /app/azure_config 2> /dev/null)
azure=end
EOF

cd /app && bash sh_client_bot.sh &

if [ ! -f /app/log_r_client.log ]; then
touch /app/log_r_client.log
fi

tail -f /app/log_r_client.log
18 changes: 0 additions & 18 deletions xiaoya/Dockerfile

This file was deleted.

19 changes: 0 additions & 19 deletions xiaoya/README.md

This file was deleted.

0 comments on commit 9a0e368

Please sign in to comment.