Reputation: 37
I recently started using WhatsAppBusiness API, i am able to install the docker containers for whatsappbusiness and i am able to access whatsapp web using the port 9090. Ex: https://172.29.208.1:9090
But I don't know how to access MySQL and WhatsAppCore app.
I tried http://172.29.208.1:33060 but nothing is happened. Please let me know how to access MySQL and wacore.
Here is my docker-compose.yml file
docker-compose.yml
version: '3' volumes: whatsappData: driver: local whatsappMedia: driver: local services: db: image: mysql:5.7.22 restart: always environment: MYSQL_ROOT_PASSWORD: testpass MYSQL_USER: testuser MYSQL_PASSWORD: testpass expose: - "33060" ports: - "33060:3306" network_mode: bridge wacore: image: docker.whatsapp.biz/coreapp:v2.19.4 command: ["/opt/whatsapp/bin/wait_on_mysql.sh", "/opt/whatsapp/bin/launch_within_docker.sh"] volumes: - whatsappData:/usr/local/waent/data - whatsappMedia:/usr/local/wamedia env_file: - db.env depends_on: - "db" network_mode: bridge links: - db waweb: image: docker.whatsapp.biz/web:v2.19.4 command: ["/opt/whatsapp/bin/wait_on_mysql.sh", "/opt/whatsapp/bin/launch_within_docker.sh"] ports: - "9090:443" volumes: - whatsappData:/usr/local/waent/data - whatsappMedia:/usr/local/wamedia env_file: - db.env environment: WACORE_HOSTNAME: wacore depends_on: - "db" - "wacore" links: - db - wacore network_mode: bridge
Upvotes: 1
Views: 5636
Reputation: 176
Mysql is not a HTTP server, it doesn't understand http://172.29.208.1:33060
you could run 'docker ps | grep mysql' to get mysql container id
8dfa30ab0200 mysql:5.7.22 "docker-entrypoint.s…" 6 minutes ago Up 6 minutes 33060/tcp, 0.0.0.0:33060->3306/tcp xxxx_db_1
then run 'docker exec -it 8dfa30ab0200 mysql -h localhost -P 3306 -u testuser --password=testpass' to access mysql
But because you haven't registered, you won't see much stuffs in mysql. Please follow steps in https://developers.facebook.com/docs/whatsapp/api/account to perform registration.
You don't need to access coreapp directly, you perform all API requests through webapp (https://172.29.208.1:9090).
Upvotes: 1