How to add or mount directory in LXD (Linux container)

Originally published at: https://www.cyberciti.biz/faq/how-to-add-or-mount-directory-in-lxd-linux-container/

I have two LXD containers running. One is for Nginx, and another is for processing data. I need to share data between two containers. How do I add or mount a shared directory between two?