Getting Started Template for Docker Users
- PHP Wechaty is fully dockerized. So it will be very easy to be used as a MicroService.
- Clone this repository, then you will be able to use Docker to run PHP Wechaty with ZERO configuration.
- Docker
- Global Internet Connection
Source code at examples/ding-dong-bot.php
./quick_start.sh
Source code at examples/ding-dong-bot.php
./quick_start_tls.sh
Source code at examples/ding-dong-bot.php
./docker-compse-start.sh
Source code at examples/ding-dong-bot.php
./docker-compse-start-tls.sh
WECHATY_PUPPET_SERVICE_TLS_CA_CERT
: can be overwrite byoptions.tlsRootCert
. Set Root CA Cert to verify the server or client.
For Puppet Server:
Environment Variable | Options | Description |
---|---|---|
WECHATY_PUPPET_SERVICE_TLS_SERVER_CERT |
options.tls.serverCert |
Server CA Cert (string data) |
WECHATY_PUPPET_SERVICE_TLS_SERVER_KEY |
options.tls.serverKey |
Server CA Key (string data) |
WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_SERVER |
options.tls.disable |
Set true to disable server TLS |
For Puppet Client:
Environment Variable | Options | Description |
---|---|---|
WECHATY_PUPPET_SERVICE_AUTHORITY |
options.authority |
Service discovery host, default: api.chatie.io |
WECHATY_PUPPET_SERVICE_TLS_CA_CERT |
options.caCert |
Certification Authority Root Cert, default is using Wechaty Community root cert |
WECHATY_PUPPET_SERVICE_TLS_SERVER_NAME |
options.serverName |
Server Name (mast match for SNI) |
WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_CLIENT |
options.tls.disable |
Set true to disable client TLS |
Learn more about tls at https://github.com/wechaty/puppet-service
Quick & easy install Docker via:
curl -sSL https://get.docker.com | sh
Or
wget -qO- https://get.docker.com/ | sh
Get to know more about Docker at: https://www.docker.com/
BATS: HOW TO USE BATS TO TEST YOUR COMMAND LINE TOOLS
- PHP Wechaty Getting Started: https://github.com/wechaty/php-wechaty-getting-started
Init docker support.
@zhangchunsheng - Chunsheng Zhang (张春生)
- Code & Docs © 2021-now Chunsheng Zhang <zhangchunsheng423@gmail.com>
- Code released under the Apache-2.0 License
- Docs released under Creative Commons