SDEROT, Israel, Nov 2 (Reuters) - The deadly Hamas attack of Oct. 7 has not scared Avi Barssessat away from his factory in Sderot, an Israeli town near the Gaza war zone that has long borne the brunt of the Islamist group's rockets.

While the border town has been temporarily abandoned by many of its residents seeking safety elsewhere, Barssessat and other Sderot business leaders are staying, determined to stand by their customers and staff and keep focused on the long term.

In Barssessat's case, he says he was also helped by a bit of luck.

Two days after the Hamas attack, a rocket fired by the militants hit his factory, starting a fire that was fortunately short-lived because the projectile had severed a water pipe.

"Everything here was like a jacuzzi," Barssessat said, surveying his damaged goods. "I was wet like hell trying to close the water, but it took a few hours, and by that time, the whole warehouse ... was flooded."

Sderot, a town of some 30,000 within four km (two miles) of Gaza, was on the front line when Hamas gunmen rampaged through Israeli communities killing around 1,400 people. At least 45 people were killed in Sderot, according to official data.

Today much of the town remains empty. Many homes are locked up and there are few people in the streets apart from military patrols. A half built home development complex remains untouched with overhead cranes standing idle.

But Barssessat, chief executive of Hollandia International, which makes luxury adjustable beds, has been busy. He rebuilt the roof of his premises himself and said he had already put in place multiple bomb shelters for hundreds of his workers, some of whom had been drafted for military service.

"I have a 20,000 square metre facility here, can I pack everything and just move? What about all of my employees from ... Sderot. Shall I fire them all and leave them here to die here in Sderot and I will move to a safer place?" he said.

"I'm here, I'm with them."

'CRAZY PREDICAMENT'

Barssessat, who has trained as a sleep specialist and has his own radio show about sleep techniques, said even he was waking up in the middle of the night drenched in sweat due to what was happening.

The Oct. 9 rocket strike was not his first such experience. A previous plant nearby was badly damaged by a rocket in 2019.

"To be in a situation where people are living constantly under threat of rockets is a crazy predicament to be in," he said.

In Sderot's industrial park nearby, other businesses also remain open, although Oct. 7 has left scars. Next to the offices of high tech start-up Carrar, Hamas fighters fired a rocket propelled grenade that damaged part of the building.

"We need to be here. So it's not ideal for us to work from home," said Dor Peretz, integration manager at Carrar.

"Families are stressed and it's very difficult for my kids and my wife (to) know that I'm here, very close to the war zone. So it’s not ideal, but we’re doing what we can to finish our commitment to the customers that we have."

Carrar is developing batteries for electric vehicles (EV) whose technology provides cooling capabilities that maintain a stable battery temperature, tripling the lifetime of EV batteries, company executives said.

Carrar's founders chose to locate to Sderot and tap pools of engineers in the south of Israel rather than traditional high tech hubs such as Tel Aviv and Herzliya in the centre of Israel.

Their Sderot office was back up a week after the attacks, and employees work with counterparts at a testing facility in Germany. At the Sderot specialist laboratory, engineers test prototype batteries including ones for Sweden's Volvo.

Carrar's CEO Avinoam Rubinstain said investors were supportive despite the conflict, which he expected would take "a few months".

"We are talking about a few years vision," he said, describing the Sderot facility as his operation's "mothership".

"GHOST TOWN"

Across the line with Gaza, where Hamas fighters have dug in, Israeli jets have kept up a relentless bombardment that has flattened entire neighbourhoods and killed more than 8,000 people, according to Palestinian authorities. There is no indication of when normal life might return.

During a visit to Sderot this week, the silence was broken by periodic tank, artillery and gunfire and the sound of drones overhead.

Shai Ben Yaish, former deputy mayor of Sderot who helped create the city's industrial park, said some residents remained due to health problems or not wanting to be uprooted.

Ben Yaish's own family has suffered tragedy. His sister, originally from Sderot, and her husband and son were among those killed on Oct. 7 in Kibbutz Kissufim, further south.

"Hamas terrorists burned them alive in their house," he said. "After we managed to bury my sister and her family, my mother and my family left Sderot for a hotel in Tel Aviv. It is good they are all together."

Ben Yaish, who is deployed as a reserve military officer in Gaza during the day, returns to Sderot at night to provide protection with other soldiers for its remaining residents.

"This is a war situation and it was the right decision to evacuate," he said. "It is a ghost town now." (Reporting by Jonathan Saul, Joseph Campbell and Ammar Awwad, editing by James Mackenzie and William Maclean)