WhatsApp / WhatsApp-Business-API-Setup-Scripts

The scripts related to setting up WhatsApp business API
MIT License
414 stars 438 forks source link

can't run docker-compose: inotify issue on Apple M1 laptop #65

Open bolducp opened 3 years ago

bolducp commented 3 years ago

I'm no longer able to run the docker-compose file because qemu for amd64 on docker for m1 doesn’t seem to support inotify (also described here). In the meantime, I've managed a work-around that is allowing me to run the local wabiz infrastructure by changing the docker-compose file as follows:

services:
  db:
    image: mysql:5.7.35
    platform: linux/amd64
  waweb:
    platform: linux/arm64/v8
    image: docker.whatsapp.biz/web:v2.35.4
    command:
      [
        "sh", "-c",
        "touch /var/log/whatsapp/web.log
        && chmod 777 /var/log/whatsapp/web.log
        && sed -i 's/  monitor_file.*/  tail -f \\/dev\\/null/g' /opt/whatsapp/bin/web_setup.sh
        && /opt/whatsapp/bin/wait_on_mysql.sh
        && /opt/whatsapp/bin/launch_within_docker.sh"
      ]

This essentially changes the infinite loop in the web_setup.sh script that uses inotify to check the value of whoami with a no-op. I don't think this should ever be an issue for me locally, so I feel okay about this work-around for now, but it would be really nice if the docker-compose script here could be instead updated to work with m1 laptops. Also, if you think this work-around is problematic for some other reason, that would be helpful to know. Thanks!

facebook-github-bot commented 3 years ago

Hi bolducp (https://github.com/bolducp),

Thank you for your comment. This GitHub repo is not actively monitored. If you need help, please check previously asked questions in the WA Business API Developer Community, or raise a Direct support ticket. Meanwhile, we are happy to continue with less time-sensitive discussions in GitHub.

Thanks for your understanding!

vuvantoan95 commented 2 years ago

I also got this error :( @bolducp