Is it okay to create websites for certain businesses like vineyards, winery, cannabis or gambling?

If no, is it permissible to create websites for businesses that are indirectly related such as restaurants that also serve alcohol, or a business that wants to teach people how to play a certain gambling game?

If making the website is promoting the haraam it is haraam.

A restaurant is okay but not something that is directly aiding and supporting haraam acts.