Residents have praised the fire service after a lorry became engulfed in a fireball and threatened to spread.