diff --git a/apps/ms365-e5-renew-x/README.md b/apps/ms365-e5-renew-x/README.md new file mode 100644 index 00000000..b0a39b9f --- /dev/null +++ b/apps/ms365-e5-renew-x/README.md @@ -0,0 +1,216 @@ +**如需修改配置文件请进入应用目录下 Deploy 文件夹,修改 `Config.xml` 配置文件。** +**默认密码:`123456`** + + +以下是原作者 README +------------ +**制作不易,欢迎Star!!!** + +本文是基于作者SundayRX提出的E5 调用API续订服务:Microsoft 365 E5 Renew X的基础上提出的Docker版本的E5调用API续订服务。 + +基础的账号注册等过程见SundayRX的博客:https://blog.csdn.net/qq_33212020/article/details/119747634 + + +**本项目主要为学习Dockerfile和Docker的部署使用,禁止将此项目进行商业化,仅推荐学习使用。** + +【20240307更新】修改密码的位置。密码的设置文件为容器中/app/Deploy目录下的Config.xml文件,修改内容为123456,将123456修改成自己的密码即可。 + +【20240115更新】内测:更新了通用版本。支持了多种CPU架构,包括linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v5,linux/arm64/v7。 + +【20230430更新】收到反馈,已经有部分同学的账号被强制关停。 + +【20230402更新】增加了邮箱通知功能。 + +## 支持版本 + +| CPU架构 | 是否支持 | +| :------------: | :------: | +| linux/amd64 | 是 | +| linux/arm64 | 是 | +| linux/arm/v7 | 是 | +| linux/arm/v5 | 是 | +| Linux/arm64/v7 | 是 | + + + +**优点:** + +- 镜像小,仅仅225M,可以轻松部署在任何配置的服务器上,占用资源小 +- 部署方便,仅仅使用一行命令即可完成部署。 +- 可以邮件通知。 +- 可以部署在多种服务器架构上等等。 + +**你需要有:** + +- 有Docker的环境,了解Docker的基本命令(没有也没有关系,可以很快学会)。 +- 有一个服务器/群晖NAS等。 + + + + + + + +
+

一些Docker环境安装的教程

+ + - Docker环境搭建:https://www.jianshu.com/p/996e08b7976d + + - 史上最全Docker环境安装指南:https://zhuanlan.zhihu.com/p/82269806 +
+ +
+ +

部署步骤

+ +1. 运行MS365 E5 Renew X镜像,得到容器。 + + + ``` + docker run -d -p 1066:1066 -e TZ=Asia/Shanghai -e sender="by123@163.com" -e pwd="UNxxxxxxxxN" -e receiver="4dddqqq9dd6@qq.com" -e adminpwd="123456" hanhongyong/ms365-e5-renew-x:pubemail + ``` + + 修改-e后面的内容,其中 sender = '123456@163.com'为发送邮件的邮箱。 + receiver = '789456@qq.com'为接收邮件的邮箱。其中pwd为发送邮箱的授权码。授权码获取方式为,进入网页版163邮箱,点击设置,点击POP3/SMTP/IMAP,点击授权密码管理,新增授权码即可。 + adminpwd为web界面的登录密码。 + +2. 服务访问:输入ip:1066. + +![image-20220211205438949](README.assets/image-20220211205438949.png) + +
+ +
+

通用版(20240115更新)这个版本支持了多种CPU架构,包括linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v5,linux/arm64/v7。

+ + - 增加了通用版本:这个版本支持了多种CPU架构,包括linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v5,linux/arm64/v7。 + + - 这个版本后续不增加其他新的功能,需要手动去设置密码(版本太多,有些指令不同版本不一样),如果你有其他版本需求,欢迎发issue. + +``` +docker run -d -p 1066:1066 -e TZ=Asia/Shanghai --name ms365 hanhongyong/ms365-e5-renew-x:general +``` + +
+ + + +
+

Email通知功能(推荐,20230402更新。)

+ + - email通知版本主要实现了检测部署的账号是否全部都正常运行。该版本会每天定时发送邮件来通知是否账号全部运行。 + + - 该版本内测使用了一个月,目前没发现什么太大的问题。 + + - 关于修改通知邮箱。推荐使用163邮箱。修改-e后面的内容,其中 sender = '123456@163.com'为发送邮件的邮箱。 + receiver = '789456@qq.com'为接收邮件的邮箱。其中pwd为发送邮箱的授权码。授权码获取方式为,进入网页版163邮箱,点击设置,点击POP3/SMTP/IMAP,点击授权密码管理,新增授权码即可。 + adminpwd为web界面的登录密码。 + + - 关于版本。已发布x86机器和arm64v8,其他版本需要可以发issue,会尽快补充。 + - 发送邮件的日志的位置:/opt/test.log + - 发送邮件的时间为每天18点。可以通过crontab命令修改。 + + - x86版本: + + + docker run -d -p 1066:1066 -e TZ=Asia/Shanghai -e sender="by123@163.com" -e pwd="UNxxxxxxxxN" -e receiver="4dddqqq9dd6@qq.com" -e adminpwd="123456" hanhongyong/ms365-e5-renew-x:pubemail + + - arm64v8版本: + + + docker run -d -p 1066:1066 -e TZ=Asia/Shanghai -e sender="byxxx@163.com" -e pwd="UxxxxWWN" -e receiver="41xxxxx@qq.com" -e adminpwd="123456" hanhongyong/ms365-e5-renew-x:arm64v8 + + +
+ +
+

监控网站运行(推荐部署)

+ [见文档](https://github.com/hongyonghan/Docker_Microsoft365_E5_Renew_X/blob/main/monitoring_service.md/) +
+ + +
+

定制版(高级操作,主要是为了高级用户分享自己的站点给别人等操作。小白无需使用。)

+ + ``` + docker run -d -p 1066:1066 -v /root/Docker_Microsoft365_E5_Renew_X/Microsoft365_E5_Renew_X/Deploy:/app/Deploy hanhongyong/ms365-e5-renew-x:latest + ``` + + 其中-p为暴露服务器的端口(前面的1066,可以自行修改)和暴露容器的端口(后面的1066,可以自行修改,这个端口是在Config.xml中指定的开放的端口);-v为数据卷的挂载,前面的Deploy指的是服务器中的Deploy文件夹(可以修改,但是必须是绝对路径),/app/Deploy指的是容器内的文件夹(不能修改);--name为容器的名字。 +
+ + + +
+

备份和迁移:

+ + + 所有的配置文件都放在/app文件路径下,如果您以后有迁移的需要可以用命令将容器中/app路径下的文件复制出来。或者在一开始的时候就可以挂载数据卷到您的之前的全部文件中。如: + ``` +docker run -d -p 1066:1066 -v /root/Docker_Microsoft365_E5_Renew_X/Microsoft365_E5_Renew_X/:/app/ hanhongyong/ms365-e5-renew-x:latest + ``` + 如此便可以实现您所要求的配置文件备份的功能,且您的容器中的文件和服务器主机中文件是一样的。 + +
+
+

轻量化镜像版本

+ + **为了使得容器更加稳定且好用(小白专用),latest版本中添加了vim等软件,并且更换了基础镜像,会有点大。如果介意,请使用slim版本** + ``` + docker pull hanhongyong/ms365-e5-renew-x:slim + ``` + 下面部署命令时版本也改为slim版本即可。slim版本仅为225M。 + 建议使用latest版本,这个版本持续修改完善下去,slim版本仅为资源受限的主机使用。 + +
+ +
+

ARM64版本镜像

+ + ``` + docker pull hanhongyong/ms365-e5-renew-x:arm + ``` + ``` + docker run -d -p 1066:1066 -e TZ=Asia/Shanghai --name ms365 hanhongyong/ms365-e5-renew-x:arm + ``` + 这个版本是基础版本,没有邮件通知等功能。如果需要邮件通知功能。 +
+ +
+

Serverless部署

+ +没有服务器的同学们,可以使用koyeb进行部署。点击下面按钮一键部署: +> [![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?type=docker&image=docker.io/hanhongyong/ms365-e5-renew-x&name=web-renew&ports=1066;http;/) + +koyeb部署:感谢[gd1214b](https://github.com/hongyonghan/Docker_Microsoft365_E5_Renew_X/issues/5)提出的解决方案。 +具体见文件: [ReadMe_Serverless.md](./ReadMe_Serverless.md) + +注意:类似于heroku和koyeb等云容器平台,都会有重启实例的现象,不过heroku是每天强制重启,koyeb是隔几天重启一次。每次重启都会丢失实例在部署后的所有更改,造成数据丢失。请大家注意。感谢[ChirmyRam](https://github.com/hongyonghan/Docker_Microsoft365_E5_Renew_X/issues/15)给出的提醒。 + +
+ +
+

开发相关的命令(与部署无关)

+ + + +``` +##构建镜像 +docker build -t ms365-e5-renew-x . +docker tag ms365-e5-renew-x:latest hanhongyong/ms365-e5-renew-x:latest + +#上传镜像 +docker push hanhongyong/ms365-e5-renew-x:latest +#登录dockerhub +docker login +#使用buildx编译arm架构的镜像 +docker buildx build --push --tag hanhongyong/ms365-e5-renew-x:arm --platform linux/arm64/v8 -f Dockerfile_arm . +``` + +
+ +### 赞助我 + +项目会持续更新,大家有啥问题可以发issue。如果可以的话,欢迎大家赞助一元钱。 + +![image-20220211205438949](https://raw.githubusercontent.com/hongyonghan/Docker_Microsoft365_E5_Renew_X/main/README.assets/zhifubao.jpg) diff --git a/apps/ms365-e5-renew-x/data.yml b/apps/ms365-e5-renew-x/data.yml new file mode 100644 index 00000000..8b058029 --- /dev/null +++ b/apps/ms365-e5-renew-x/data.yml @@ -0,0 +1,13 @@ +additionalProperties: + key: ms365-e5-renew-x + name: Microsoft 365 E5 Renew X + tags: + - Tool + shortDescZh: Docker版本的 Microsoft 365 E5 调用 API 续订服务 + shortDescEn: Docker version of Microsoft 365 E5 calls API renewal service + type: tool + crossVersionUpdate: true + limit: 0 + website: https://github.com/hongyonghan/Docker_Microsoft365_E5_Renew_X + github: https://github.com/hongyonghan/Docker_Microsoft365_E5_Renew_X + document: https://blog.csdn.net/qq_33212020/article/details/119747634 \ No newline at end of file diff --git a/apps/ms365-e5-renew-x/latest/Deploy/Config.xml b/apps/ms365-e5-renew-x/latest/Deploy/Config.xml new file mode 100644 index 00000000..5f79780e --- /dev/null +++ b/apps/ms365-e5-renew-x/latest/Deploy/Config.xml @@ -0,0 +1,76 @@ + + + + + + 1066 + + 123456 + + true + + + + https://beian.miit.gov.cn + + + + + false + + + + + + + + + + false + + + + + + + + smtp.163.com + + + + + + + false + + + + + + + + + false + + + + + + + + + + false + + + + + + + + 1 + + 30 + + + diff --git a/apps/ms365-e5-renew-x/latest/data.yml b/apps/ms365-e5-renew-x/latest/data.yml new file mode 100644 index 00000000..bb0638c2 --- /dev/null +++ b/apps/ms365-e5-renew-x/latest/data.yml @@ -0,0 +1,10 @@ +additionalProperties: + formFields: + - default: 1066 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number \ No newline at end of file diff --git a/apps/ms365-e5-renew-x/latest/docker-compose.yml b/apps/ms365-e5-renew-x/latest/docker-compose.yml new file mode 100644 index 00000000..04e6974f --- /dev/null +++ b/apps/ms365-e5-renew-x/latest/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.9' +services: + ms365-e5-renew-x: + image: hanhongyong/ms365-e5-renew-x:latest + container_name: ${CONTAINER_NAME} + environment: + - TZ=Asia/Shanghai + ports: + - ${PANEL_APP_PORT_HTTP}:1066 + networks: + - 1panel-network + volumes: + - ./Deploy:/app/Deploy + - ./appdata:/app/appdata +networks: + 1panel-network: + external: true \ No newline at end of file diff --git a/apps/ms365-e5-renew-x/logo.png b/apps/ms365-e5-renew-x/logo.png new file mode 100644 index 00000000..d33dcf25 Binary files /dev/null and b/apps/ms365-e5-renew-x/logo.png differ