Don't buy alcohol. Seriously, when there's no booze around, I don't drink. When there is booze around, I often end up drinking ALL of it. Don't buy it, and you're good to go.
You can "out plan" temptation if you avoid making decisions in the moment.
Though - the same as a careful diet - social engagements throw a wrench in the discipline machine. Restaurants, bars, parties, etc.