add java_oci_manage

This commit is contained in:
Stille 2022-12-26 15:47:53 +08:00
parent c523b4bbb5
commit 067700f5de
5 changed files with 130 additions and 0 deletions

View File

@ -0,0 +1,13 @@
FROM openjdk:20-ea-11-jdk-slim-bullseye
LABEL maintainer="Stille <stille@ioiox.com>"
ENV VERSION 3.7.1
RUN apt-get update && apt-get install -y wget procps
WORKDIR /app
RUN wget -O gz_client_bot.tar.gz https://github.com/semicons/java_oci_manage/releases/latest/download/gz_client_bot.tar.gz \
&& tar -zxvf gz_client_bot.tar.gz --exclude=client_config \
&& tar -zxvf gz_client_bot.tar.gz --skip-old-files client_config \
&& rm -rf gz_client_bot.tar.gz \
&& chmod +x sh_client_bot.sh

50
java_oci_manage/README.md Normal file
View File

@ -0,0 +1,50 @@
# java_oci_manage
GitHub [stilleshan/java_oci_manage](https://github.com/stilleshan/dockerfiles)
Docker [stilleshan/java_oci_manage](https://hub.docker.com/r/stilleshan/java_oci_manage)
> *docker image support for X86 and ARM*
## 简介
基于 [semicons/java_oci_manage](https://github.com/semicons/java_oci_manage) 项目的 docker 镜像.
本项目仅为方便 docker 容器化部署,相关使用教程及问题请参考官方项目.
## docker 部署
### 准备配置文件
- 参考官方项目,准备 oracle api key 私钥文件`key.pem`.
- 参考官方项目,配置 client_config 文件,注意 key 路径为`key_file=/app/key.pem`.
### 启动 docker 容器
```bash
docker run -itd --name rrr --restart always \
-v /root/config/client_config:/app/client_config \
-v /root/config/key.pem:/app/key.pem \
-p 9527:9527 \
stilleshan/java_oci_manage
```
### 进入 docker 容器
```bash
docker exec -it rrr bash
```
### 启动服务
```bash
bash sh_client_bot.sh
```
启动服务,日志提示成功后即可 ctrl + c 退出终端,服务将在容器内后台执行.
```bash
tail -f log_r_client.log
# 查看日志
ps -ef | grep r_client.jar | grep -v grep | awk '{print $2}' | xargs kill -9
# 停止服务进程
```
## docker compose 部署
参考完成上述配置后,下载 [docker-compose.yml](https://raw.githubusercontent.com/stilleshan/dockerfiles/main/java_oci_manage/docker-compose.yml) 执行以下命令启动:
```shell
docker-compose up -d
```
## 链接
- [semicons/java_oci_manage](https://github.com/semicons/java_oci_manage)

View File

@ -0,0 +1,54 @@
#在oci=begin和oci=end之间放入你的API配置信息 支持多个配置文件 机器人切换profile可更换操作配置
oci=begin
[DEFAULT]
user=ocid1.user.oc1..aaaaaaaaxxxxgwlg3xuzwgsaazxtzbozqq
fingerprint=b8:33:6f:xxxx:45:43:33
tenancy=ocid1.tenancy.oc1..aaaaaaaaxxx7x7h4ya
region=ap-singapore-1
key_file=写你的API密钥文件路径
[DEFAULT2]
user=ocid1.user.oc1..aaaaaaaaxxxxgwlg3xuzwgsaazxtzbozqq
fingerprint=b8:33:6f:xxxx:45:43:33
tenancy=ocid1.tenancy.oc1..aaaaaaaaxxx7x7h4ya
region=ap-singapore-1
key_file=写你的API密钥文件路径
oci=end
#用户信息 从 https://t.me/radiance_helper_bot 配置(bot可使用/raninfo命令随机生成)
#必传
username=
#必传
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=
#在azure=begin和azure=end之间放入你的azure的API配置信息 支持多个配置文件 机器人切换profile可更换操作配置 上传配置支持使用原格式({"appId":"xxx","password":"xxx"...})上传
azure=begin
[az001]
appId=551xxxx7-xxxx-xxxx-xxxx-b9xxxx60cc65
password=T618Q~.LIy_xxxxx~jm~xxxxxx
tenant=xxxx3713-xxxx-4cb5-xxxx-3001060xxxxx
azure=end

View File

@ -0,0 +1 @@
请上传 API 密钥文件

View File

@ -0,0 +1,12 @@
version: "3"
services:
oci:
image: stilleshan/java_oci_manage
container_name: rrr
tty: true
ports:
- 9527:9527
volumes:
- ./config/client_config:/app/client_config
- ./config/key.pem:/app/key.pem
restart: always