Bars in major Chinese cities are delivering their happy hour drinks deals to customers' places of residence as a large number of people remain stuck indoors because of the outbreak of the new coronavirus.

Happy hour deals, where drinks are discounted, are usually reserved for patrons who are physically present at an establishment.

But with people staying at home in China and some cities putting a ban on dining out in groups, to try to contain the spread of the virus, bars are taking drinks to where their customers are.

In the southern Chinese city of Guangzhou, a major trading and economic hub, a number of bars have started delivering their discounted drinks.

Bandidos, a Mexican eatery, is packing its 25 yuan ($3.58) Margaritas into jars and sending them with a straw to customers. Their happy hour is from Monday to Friday between 4 p.m. to 7 p.m local time. Customers can contact one of the representatives for the bar on messaging app WeChat to order their drinks.

A gin bar called Evening Standard has launched a delivery menu for their cocktails too.

And Hope and Sesame, a "speakeasy" jazz bar which was on Asia's 50 Best Bars list for 2019, is selling bottled versions of their cocktails.

In Beijing, a brewpub called Jing-A Brewing Co. said it is remaining open but only for takeaway orders, deliveries to peoples' residences and refills when people bring their own beer containers, known as growlers.

"This change is due to local authorities prohibiting groups of more than 3 from dining or congregating in our brewpub," the company said in a WeChat post.

The bar, which has a couple of locations in the Chinese capital, said it has extended its delivery hours from 11 a.m. to 11 p.m. Beijing time. Users can order through delivery platform Meituan. Jing-A is offering deals on its beer delivery.

The coronavirus has spread across the world, claiming the lives of over 1,700 people, mainly in China. Businesses stayed shut longer than usual after the Lunar New Year holiday while many people are still working from home. This has forced them to rely more on deliveries of products from platforms like Meituan or JD.com.

Despite drinking establishments trying to make the best out of a bad situation, it doesn't appear to be hugely helping their businesses.

"At least (delivery) is better than nothing," Philip, the owner of Evening Standard in Guangzhou, told CNBC.

Another bar owner, who wished to remain anonymous to protect his business, said he is considering introducing deliveries but is concerned about the impact.

"It doesn't compare with being open. We aren't profitable doing this," the owner told CNBC.

— CNBC's Evelyn Cheng contributed to this report.