https://github.com/wechaty/docker-php-wechaty-getting-started
Getting Started Template for Docker Users
https://github.com/wechaty/docker-php-wechaty-getting-started
chatbot docker php-wechaty wechaty
Last synced: about 2 months ago
JSON representation
Getting Started Template for Docker Users
- Host: GitHub
- URL: https://github.com/wechaty/docker-php-wechaty-getting-started
- Owner: wechaty
- Created: 2021-11-23T15:18:19.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-30T08:09:40.000Z (over 4 years ago)
- Last Synced: 2025-06-29T20:39:12.986Z (about 1 year ago)
- Topics: chatbot, docker, php-wechaty, wechaty
- Language: Shell
- Homepage:
- Size: 32.2 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DOCKER-PHP-WECHATY-GETTING-STARTED
[](https://github.com/wechaty/wechaty)
[](https://hub.docker.com/r/phpwechaty/php-wechaty/)
[](https://hub.docker.com/r/phpwechaty/php-wechaty/)
[](https://github.com/wechaty/docker-wechaty-getting-started/actions/workflows/docker.yml)
[](https://github.com/wechaty/php-wechaty)
[](https://hub.docker.com/r/phpwechaty/php-wechaty/)
Getting Started Template for Docker Users
## FEATURES
1. PHP Wechaty is fully dockerized. So it will be very easy to be used as a MicroService.
1. Clone this repository, then you will be able to use Docker to run PHP Wechaty with ZERO configuration.
## REQUIREMENTS
1. Docker
1. Global Internet Connection
## USAGE
### Run Bot Examples
#### 1. Run PHP Example with no tls
Source code at `examples/ding-dong-bot.php`
```shell
./quick_start.sh
```
#### 2. Run PHP Example with tls
Source code at `examples/ding-dong-bot.php`
```shell
./quick_start_tls.sh
```
#### 3. Run PHP Example with docker-compose and no tls
Source code at `examples/ding-dong-bot.php`
```shell
./docker-compse-start.sh
```
#### 4. Run PHP Example with docker-compose and tls
Source code at `examples/ding-dong-bot.php`
```shell
./docker-compse-start-tls.sh
```
#### New environment variables
1. `WECHATY_PUPPET_SERVICE_TLS_CA_CERT`: can be overwrite by `options.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
## DOCKER
### Install Docker
Quick & easy install Docker via:
```shell
curl -sSL https://get.docker.com | sh
```
Or
```shell
wget -qO- https://get.docker.com/ | sh
```
Get to know more about Docker at:
## TEST
BATS: [HOW TO USE BATS TO TEST YOUR COMMAND LINE TOOLS](https://www.engineyard.com/blog/bats-test-command-line-tools)
## SEE ALSO
1. PHP Wechaty Getting Started:
## HISTORY
### v0.1 (Nov 23, 2021)
Init docker support.
## AUTHOR
[@zhangchunsheng](https://github.com/zhangchunsheng) - Chunsheng Zhang (张春生)
## COPYRIGHT & LICENSE
- Code & Docs © 2021-now Chunsheng Zhang \
- Code released under the Apache-2.0 License
- Docs released under Creative Commons