Git Product home page Git Product logo

docker-wecomchan's Introduction

docker-wecomchan

GPL LICENSE

建立应用详情见: easychen/wecomchan

docker 部署

docker run --name wecomchan -itd -v ${PWD}/config:/config -e UID=$(stat -c %u test) -e GID=$(stat -c %g test) -p 9877:9877 ghcr.io/vergilgao/wecomchan:latest

首次运行时我们将在挂载的config目录下创建配置文件。

[server]
ip=127.0.0.1
port=9877

[wecom]
cid=
aid=
secret=

一般来说,你只需要修改wecom节点下的3个配置:

  • cid 企业微信公司ID
  • aid 企业应用的ID
  • secret 企业微信应用Secret

修改完成后,你需要重新启动docker容器。

环境变量

  • TZ 时区,为了裁剪尺寸,当前版本并未引入时区设置功能,如果想要设置时区,可以考虑将 /etc/localtime 以只读方式挂载到镜像中
  • UID 和 GID 用户ID和组ID,当前版本只有一个配置文件,方便起见,你可以将此ID设置为你需要用来修改配置文件的用户的ID和GID
  • UMASK 默认的UMASK,设置为 022 就足够了

api

api只支持 post

当前版本只支持发送 text 消息

api 路径为 /api/text

发送的 body 内容即为推送的消息内容,其中引号无需转义:

你的快递已到,请携带工卡前往邮件中心领取。
出发前可查看<a href="http://work.weixin.qq.com">邮件中心视频实况</a>,聪明避开排队。

服务器收到命令后,统一响应 http 代码为 200 返回的消息体为如下格式:

{
    "code": 0
    "error_message": ""
}

当 code 为 0 时,说明一切正常。 其他 code 代码的说明如下:

  • 1300 发送消息到企业微信接口返回错误,响应代码见 error_message
  • 1301 发送消息到企业微信接口失败,对端响应错误
  • 1302 请求企业微信token错误
  • 1400 请求了当前服务器不支持的路由

docker-wecomchan's People

Contributors

vergilgao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.