On 11 November, at 5:00 am, an armistice with Germany was signed in a railroad carriage at Compiègne. At 11 am on 11 November 1918—"the eleventh hour of the eleventh day of the eleventh month"—a ceasefire came into effect. During the six hours between the signing of the armistice and its taking effect, opposing armies on the Western Front began to withdraw from their positions, but fighting continued along many areas of the front, as commanders wanted to capture territory before the war ended. The occupation of the Rhineland took place following the Armistice. The occupying armies consisted of American, Belgian, British and French forces. In November 1918, the Allies had ample supplies of men and materiel to invade Germany. Yet at the time of the armistice, no Allied force had crossed the German frontier, the Western Front was still some 720 kilometres  from Berlin, and the Kaiser's armies had retreated from the battlefield in good order. These factors enabled Hindenburg and other senior German leaders to spread the story that their armies had not really been defeated. This resulted in the stab-in-the-back legend, which attributed Germany's defeat not to its inability to continue fighting , but to the public's failure to respond to its "patriotic calling" and the supposed intentional sabotage of the war effort, particularly by Jews, Socialists, and Bolsheviks. The Allies had much more potential wealth they could spend on the war. One estimate  is that the Allies spent $58 billion on the war and the Central Powers only $25 billion. Among the Allies, the UK spent $21 billion and the US $17 billion; among the Central Powers Germany spent $20 billion.
Question: Which happened earlier, the signing of an armistice with Germany or the ceasefire coming into effect?
Answer: signing of an armistice