온프레미스 API에 대한 지원을 중단합니다. 자세한 내용과 차세대 클라우드 API로 마이그레이션하는 방법을 알아보려면 온프레미스 API 지원 중단 문서를 참조하세요.
There will be downtime during the upgrade process.
Update the WA_API_VERSION
environmental variable to the new version number using:
export WA_API_VERSION=new-whatsapp-version
Restart the Docker containers by running:
~/biz $ docker-compose -f docker-compose.yml -f network-waent.yml up -d
The resulting output should look like the following:
biz_db_1 is up-to-date Recreating biz_wacore_1 ... done Recreating biz_waweb_1 ... done
To upgrade multiple instances SSH to each Webapp, Master, and Coreapp host and execute the following scripts:
Replace your-webapp-hostname
, your-master1-hostname
, your-master2-hostname
, your-coreapp1-hostname
, your-coreapp2-hostname
, username@$host
, /your-local-path/
, and NEW-WA-API-VERSION
with your environment names.
# ssh to each Webapp host, execute scripts with new WA_API_VERSION to upgrade Webapp on the host for host in your-webapp-hostname; do cmd="EXTERNAL_HOSTNAME=$host WA_API_VERSION=NEW-WA-API-VERSION docker-compose -f /your-local-path/prod-multiconnect-compose.yml -f /your-local-path/network-waent.yml up -d" ssh username@$host $cmd waweb done # ssh to each Master host, execute scripts with new WA_API_VERSION to upgrade Master on the host for host in your-master1-hostname your-master2-hostname; do cmd="EXTERNAL_HOSTNAME=$host WA_API_VERSION=NEW-WA-API-VERSION docker-compose -f /your-local-path/prod-multiconnect-compose.yml -f /your-local-path/network-waent.yml up -d" ssh username@$host $cmd master done # ssh to each Coreapp host, execute scripts with new WA_API_VERSION to upgrade Coreapp on the host for host in your-coreapp1-hostname your-coreapp2-hostname; do cmd="EXTERNAL_HOSTNAME=$host WA_API_VERSION=NEW-WA-API-VERSION docker-compose -f /your-local-path/prod-multiconnect-compose.yml -f /your-local-path/network-waent.yml up -d" ssh username@$host $cmd wacore done
For MySQL database users upgrading to v2.23.x
and later, you can upgrade your database while your application is runnin.
The dbupgrade-compose.yml file has fields indicating the container version.
Example:
services: dbupgrade: image: docker.whatsapp.biz/coreapp:v${WA_API_VERSION:-2.21.3}
To upgrade an installation, start the dbupgrade-service container with the WA_API_VERSION
environment variable set to the latest version:
~/biz $ WA_API_VERSION=new-whatsapp-version docker-compose -f dbupgrade-compose.yml -f network-waent.yml up -d
For mutliple instances:
EXTERNAL_HOSTNAME=$host_to_upgradedb WA_API_VERSION=new-whatsapp-version docker-compose -f dbupgrade-compose.yml -f network-waent.yml up -d
Note: If you are using an orchestration that restarts the container upon exit irrespective of the exit code, start the service with the EXIT_ON_SUCCESS
environment variable set to FALSE
in order to avoid exiting the container when the exit code is 0
.
If the database upgrade is successful, the container will exit with code 0
. You can use the following Docker command to track the status:
~/biz $ docker wait your-database-upgrade-container-name
This will output the exit code of the dbupgrade-service container.
Restart the Coreapp and Webapp Docker containers with the WA_API_VERSION
environment variable set to the latest version:
~/biz $ WA_API_VERSION=new-whatsapp-version docker-compose -f docker-compose.yml -f network-waent.yml up -d
For multiple instances:
EXTERNAL_HOSTNAME=$host_to_upgradedb WA_API_VERSION=new-whatsapp-version docker-compose -f dbupgrade-compose.yml -f network-waent.yml up -d
2.29.3
and AboveIf you are upgrading from v2.29.1
, v2.29.2
or encountered problems during upgrade to those versions and had to roll back for stability, we recommend you upgrade to v2.29.3
, then run the following command on the Webapp Docker container:
chown -R root your-media-directory/incoming your-media-directory/outgoing your-media-directory/shared
Unless you have changed it, the default media directory is /usr/local/wamedia
.
Note:
v2.29.1
and v2.29.2
.If you need to reset your development environment by removing all containers, run the following command from the directory containing the docker-compose.yml
file:
~/biz $ docker-compose -f docker-compose.yml -f network-waent.yml down
The resulting output should look like the following:
Stopping biz_waweb_1 ... done Stopping biz_wacore_1 ... done Stopping biz_db_1 ... done Removing biz_waweb_1 ... done Removing biz_wacore_1 ... done Removing biz_db_1 ... done Removing network waent
To get rid of all volumes defined in the docker-compose.yml
file in addition to the containers, run the down
command with the -v
parameter:
~/biz $ docker-compose down -v