I have this large wooden box (2x4's and plywood) that I am making, with a single door (blue) on the front, hinged at the bottom. It might not be clear from my crappy sketch but the door is the full width, the sides (pink) are behind it when it is closed (it rests on the front edge of the sides).
This box has a top but it isn't shown; the top is also a hinged lid, and can't be latched to the front door, it needs to stay independent.
I need a locking mechanism that I can use to hold it shut (doesn't need a key, just needs to hold it shut). The problem I'm having is that due to this box's construction, the sides have an inch or two of flex in them (red arrows), they don't naturally line up with the door. This is OK but it means that I need a type of lock that can not only hold the door shut, but can also prevent side-to-side movement of the sides when it is locked.
Also because the sides of the door are flush with the faces of the side, the lock pretty much has to be mounted on the side. So basically I need a type of lock that can hold two surfaces flush and prevent them from being separated. That is, I need a lock that I can mount on the side that constrains movement in both the red and blue arrow directions in the sketch above.
The edge of the door is 1.5" wide.
Is there any type of lock like this? The locks I've seen so far are:
Barrel bolt lock: Won't work on the side since the bolt just slips right out, these can't prevent motion along the long axis of the bolt. Although if one existed that had pins on both sides...
Hasp lock with a twisty thing: Won't keep the sides flush with the door edge when locked:
Hook and eye: Pretty much the same problem as the hasp lock:
Gate latch: I don't think this would work, they aren't really designed to prevent movement along the long axis, and even though I might be able to find one where the ball on the end is big enough to not slip through the hole, it would have some play in it so wouldn't hold the door closed tightly, plus it would be super awkward to open and close:
Sash lock: The closest thing I've found to what I want so far, but even this doesn't quite work, it only prevents movement along one direction of the red arrows. Plus, they tend to be on the small side, being designed for windows, and so I'd be concerned about the mounting screw being so close to the edge of the wood:
I don't really know what other types of locks there are. What can I use for this?
I'm not too concerned about cost; I only need two of them (one for each side). I also don't need ultra high strength along the red arrows, the box won't really be holding anything that puts any amount of stress on the sides. What I do care about is longevity; the door won't be opened or closed particularly often but it does need to last for at least a few years.
I hope I've explained this clearly.
Edit: I think maybe something along the lines of this sketch could work, I'm not sure if there is a lock type like it that I could purchase, or maybe I can piece together some hardware. This would involve a barrel bolt lock on the front that slides through the hole in the tab:
Maybe something like that could work? As long as the slot for the tab is wide enough to account for the curved path of the closing door. I'd be concerned about the red arrow movement ripping out the screws holding the tab in place over time but if it was a T shape with a wider mounting plate and more screws, that could work.