通过企业微信向微信推送消息,Docker Compose 配置文件: 1version: '3'2 3services:4 5 go-wecomchan:6 image: docker.io/aozakiaoko/go-wecomchan:latest7 environment:8 - SENDKEY=发送时用来验证的key 自定义9 - WECOM_CID=企业微信公司ID10 - WECOM_SECRET=企业微信应用Secret11 - WECOM_AID=企业微信应用ID12 - WECOM_TOUID=@all13 - REDIS_STAT=ON14 - REDIS_ADDR=redis:637915 - REDIS_PASSWORD=redis的连接密码16 ports:17 - 8080:808018 networks:19 - go-wecomchan20 depends_on:21 - redis22 23 redis:24 image: bitnami/redis:6.225 environment:26 - REDIS_PASSWORD=redis的连接密码27 - REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL28 networks:29 - go-wecomchan30 volumes:31 - /data/redis:/bitnami/redis/data32 33volumes:34 redis_data:35 driver: local36 37networks:38 go-wecomchan: 测试 Terminal window1# 推送文本消息2curl --location --request GET 'http://localhost:8080/wecomchan?sendkey={你的sendkey}&msg={你的文本消息}&msg_type=text'3 4# 推送图片消息5curl --location --request POST 'http://localhost:8080/wecomchan?sendkey={你的sendkey}&msg_type=image' \6--form 'media=@"test.jpg"'