From 04d65150edbe3be4dc0737e9ac44fa0ed2e62962 Mon Sep 17 00:00:00 2001 From: allburov Date: Thu, 7 Sep 2023 13:47:41 +0700 Subject: [PATCH] [core] Add install doc --- README.md | 2 +- .../content/en/docs/how-to/install/index.md | 115 ++++++++++++++++++ .../en/docs/how-to/plus-version/index.md | 2 +- .../en/docs/how-to/send-messages/index.md | 2 +- docs/site/content/en/docs/overview/faq.md | 20 --- .../en/docs/overview/quick-start/index.md | 10 +- examples/python/README.md | 2 +- 7 files changed, 124 insertions(+), 29 deletions(-) create mode 100644 docs/site/content/en/docs/how-to/install/index.md diff --git a/README.md b/README.md index 52569e32..4bffb8c6 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ docker pull devlikeapro/whatsapp-http-api ![](./docs/site/content/en/docs/overview/quick-start//images/versions/plus.png) For Plus version, we use login to get the image before: ```bash -docker login -u devlikeapro -p {PASSWORD} +docker login -u devlikeapro -p {KEY} docker pull devlikeapro/whatsapp-http-api-plus docker logout ``` diff --git a/docs/site/content/en/docs/how-to/install/index.md b/docs/site/content/en/docs/how-to/install/index.md new file mode 100644 index 00000000..90c68b8e --- /dev/null +++ b/docs/site/content/en/docs/how-to/install/index.md @@ -0,0 +1,115 @@ +--- +title : "Install" +description: "How to install and update WAHA" +lead: "" +date: 2020-10-06T08:48:45+00:00 +lastmod: 2020-10-06T08:48:45+00:00 +draft: false +images: [] +weight: 109 +--- + +On the page you'll find answers on how to install WAHA. + +If you wish to read a quick start guide which show you how to send you first message via HTTP API +please go to [**Quick Start ->**]({{< relref "/docs/overview/quick-start" >}}). + +WAHA is distributed in two versions, that have a similar installation instructions. +- WAHA Core ![](/images/versions/core.png) - the basic version that meet almost 80% people's needs. 100% free and [open source ->](https://github.com/devlikeapro/whatsapp-http-api). +- WAHA Plus ![](/images/versions/plus.png) - the version with advanced messages, security, and reliability features. Donations, no license expiration, quick updates, read more about [Plus Version β†’]({{< relref "plus-version" >}}) + +## Requirements + +Only thing that you must have - installed docker. Please follow the original +instruction how to install docker ->. + +{{< details "Why Docker?" >}} +Docker makes it easy to ship all-in-one solution with the runtime and dependencies. You don't have to worry about +language-specific libraries or chrome installation. + +Also, Docker makes installation and update processes so simple, just one command! +{{< /details >}} + +## WAHA Core +Download the image: +```bash +docker pull devlikeapro/whatsapp-http-api +``` + +Run the container: +```bash +docker run -it -p 3000:3000/tcp devlikeapro/whatsapp-http-api +``` + +Open API documentation [http://localhost:3000](http://localhost:3000). + +## WAHA Plus +Before installing WAHA Plus version you need to get a key, `{KEY}` in below commands, in format `dckr_pat_1111` + +We distribute the key via two platforms (Boosty and Patreon) and you'll find the active key **in the latest post**. +Keep in mind that we publish new key every month, so you must get the latest active key in order to download +the latest image. + +Read more about [**Plus Version β†’**]({{< relref "plus-version" >}}) + +{{< alert icon="πŸ‘‰" text="Subscribe as **PRO** level and get your personal key which won't expire every month while you're supporting the project" />}} + +Download the image: +```bash +docker login -u devlikeapro -p {KEY} +docker pull devlikeapro/whatsapp-http-api-plus +docker logout +``` + +Run the container: +```bash +docker run -it -p 3000:3000/tcp devlikeapro/whatsapp-http-api-plus +``` + +Open API documentation [http://localhost:3000](http://localhost:3000). + +## ARM +If you’re using **ARM** processor (like Apple Silicon, Apple M1, etc.) - add `:arm` tag at the end of the image name in the above commands. +- **WAHA Core** - `devlikeapro/whatsapp-http-api:arm` +- **WAHA Plus** - `devlikeapro/whatsapp-http-api-plus:arm` + +You can also rename the image after you downloaded it with `docker tag` command, +so you can use the same image names in commands: +```bash +# Rename WAHA Core ARM +docker tag devlikeapro/whatsapp-http-api:arm devlikeapro/whatsapp-http-api + +# Rename WAHA Plus ARM +docker tag devlikeapro/whatsapp-http-api-plus:arm devlikeapro/whatsapp-http-api-plus +``` + + +## Update WAHA +{{< alert icon="πŸ’‘" text="Please test all new versions in the development environment before updating production!" />}} + +The commands are the same as for downloading, expected you need to restart **all working containers** after you download new image. + +**WAHA Core** - download new image +```bash +# Download the image +docker pull devlikeapro/whatsapp-http-api + +# Restart all containers +docker stop whatsapp-http-api +docker rm whatsapp-http-api +docker run -it --rm -p 3000:3000/tcp --name whatsapp-http-api devlikeapro/whatsapp-http-api +``` + +**WAHA Plus** - download new image (please use **the latest key** from Boosty or Patreon) +```bash +# Download the image +docker login -u devlikeapro -p {KEY} +docker pull devlikeapro/whatsapp-http-api-plus +docker logout +docker stop whatsapp-http-api + +# Restart all containers +docker stop whatsapp-http-api +docker rm whatsapp-http-api +docker run -it --rm -p 3000:3000/tcp --name whatsapp-http-api devlikeapro/whatsapp-http-api +``` diff --git a/docs/site/content/en/docs/how-to/plus-version/index.md b/docs/site/content/en/docs/how-to/plus-version/index.md index 65ff2812..3a9eae27 100644 --- a/docs/site/content/en/docs/how-to/plus-version/index.md +++ b/docs/site/content/en/docs/how-to/plus-version/index.md @@ -131,7 +131,7 @@ Go ahead and get your own WhatsApp HTTP API! ### Install Plus After you get the password, use it to login and download docker image: ```bash -docker login -u devlikeapro -p {PASSWORD} +docker login -u devlikeapro -p {KEY} docker pull devlikeapro/whatsapp-http-api-plus docker logout ``` diff --git a/docs/site/content/en/docs/how-to/send-messages/index.md b/docs/site/content/en/docs/how-to/send-messages/index.md index c4999e0e..c20d8002 100644 --- a/docs/site/content/en/docs/how-to/send-messages/index.md +++ b/docs/site/content/en/docs/how-to/send-messages/index.md @@ -75,7 +75,7 @@ To reply on a message - use `POST /api/reply` with example payload. ``` #### Reply files ![](/images/versions/plus-soon.png) -WAHA does not support reply with files (images, voice, etc). If you're interested in it - please create an issue in GitHub. +WAHA does not support reply with files (images, voice, etc.). If you're interested in it - please create an issue in GitHub. ### Add a reaction Use `PUT /api/reaction` method to set reaction to a message. diff --git a/docs/site/content/en/docs/overview/faq.md b/docs/site/content/en/docs/overview/faq.md index 4912acdd..04f8bfd6 100644 --- a/docs/site/content/en/docs/overview/faq.md +++ b/docs/site/content/en/docs/overview/faq.md @@ -13,26 +13,6 @@ weight: 130 toc: true --- -## How to update? - -{{< alert icon="πŸ’‘" text="Please test all new versions in the development environment before updating production!" />}} - -![](/images/versions/core.png) For **Core** version the command is - -```bash -docker pull devlikeapro/whatsapp-http-api -``` - -![](/images/versions/plus.png) For **Plus** version, we use login to get the image before: - -```bash -docker login -u devlikeapro -p {PASSWORD} -docker pull devlikeapro/whatsapp-http-api-plus -docker logout -``` - -Read more about how to get `PASSWORD` for [Plus Version β†’]({{< relref "plus-version" >}}) - ## How much CPU and Memory does WhatsApp HTTP API consume? The benchmark has been made on **Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz**. diff --git a/docs/site/content/en/docs/overview/quick-start/index.md b/docs/site/content/en/docs/overview/quick-start/index.md index 7d132072..4c700664 100644 --- a/docs/site/content/en/docs/overview/quick-start/index.md +++ b/docs/site/content/en/docs/overview/quick-start/index.md @@ -29,7 +29,7 @@ When you are ready - come back and follows the below steps to send the first tex Docker makes it easy to ship all-in-one solution with the runtime and dependencies. You don't have to worry about language-specific libraries or chrome installation. -Also Docker makes installation and update processes so simple, just one command! +Also, Docker makes installation and update processes so simple, just one command! {{< /details >}} ## Send your first message @@ -63,7 +63,7 @@ docker pull devlikeapro/whatsapp-http-api ![](/images/versions/plus.png) For Plus version, we use login to get the image before: ```bash -docker login -u devlikeapro -p {PASSWORD} +docker login -u devlikeapro -p {KEY} docker pull devlikeapro/whatsapp-http-api-plus docker logout ``` @@ -72,7 +72,7 @@ Read more about how to get `PASSWORD` for [Plus Version β†’]({{< relref "plus-ve #### 1.1 Download image on ARM -If you're using ARM (like Apple Silicon, Apple M1, etc) - use following commands to download the image +If you're using ARM (like Apple Silicon, Apple M1, etc.) - use following commands to download the image ![](/images/versions/core.png) For Core version the command is ```bash @@ -84,12 +84,12 @@ docker tag devlikeapro/whatsapp-http-api:arm devlikeapro/whatsapp-http-api ![](/images/versions/plus.png) For Plus version the command is: ```bash -docker login -u devlikeapro -p {PASSWORD} +docker login -u devlikeapro -p {KEY} docker pull devlikeapro/whatsapp-http-api-plus:arm docker logout # Rename it, so you can use devlikeapro/whatsapp-http-api image in other place -docker tag devlikeapro/whatsapp-http-api-plus:arm devlikeapro/whatsapp-http-api +docker tag devlikeapro/whatsapp-http-api-plus:arm devlikeapro/whatsapp-http-api-plus ``` ### 2. Run WhatsApp HTTP API diff --git a/examples/python/README.md b/examples/python/README.md index f6c334a5..7e045513 100644 --- a/examples/python/README.md +++ b/examples/python/README.md @@ -28,7 +28,7 @@ docker run -it --rm --network=host -e WHATSAPP_HOOK_URL=http://localhost:5000/bo #### Download image - ARM -If you're using ARM (like Apple Silicon, Apple M1, etc) - use following commands to download the image +If you're using ARM (like Apple Silicon, Apple M1, etc.) - use following commands to download the image ![](/images/versions/core.png) For Core version the command is ```bash