500k is not enough.
M16s used to be sold to the government for about $650, the M27 that I was issued cost the government 1,300. I have no idea how much the new Sig rifles cost, but Infantry rifles are the modern spear. It's the foundation of your fighting force.
According to a 0341 Sgt that I pestered with too many questions a while ago, the ENTIRE mortar system with all of its extra toys costs millions of dollars. The tubes themselves are worth 200k (81mm M252 mortar). M240s cost just under 7k, an M2 used to cost 1200 during WW2 (I do not know if that is adjusted for inflation or not) but the Army was paying 12k for them in 2012.
The point is if you want a properly equipped infantry company, just under 200 dudes, you are already going to be over budget. And a company is the smallest your force could be and still function in this role.
Sigfried line or Ostwall
You don't have to worry about MBTs but tanks and other improvised armored vehicles are still a problem. An M2 might do the trick but not alone and only on lighter vehicles. You'd need Dragons teeth and AT (Anti Tank) ditches. And A LOT of them. Fill in the gaps with anti-personnel, AT mines/IEDs, and a healthy serving of barbed wire and you have a decent outer perimeter.
For the inside where your defenders will fight, there's the 'survivability onion,' i.e. the best way to survive an engagement with the enemy is to not be seen in the first place. A trench network reinforced with concrete in key positions and extensively camouflaged. If built properly, only enemy indirect fire would be effective against your position.
Placing machine guns on positions with roads, river beds, or any other form of terrain that an enemy force would use to approach. If you have AT weapons like RPGs or LAWs, those would be in positions near the machine guns but not the same position. This prevents you from losing all your firepower to one lucky mortar or artillery hit. The mortars would sit in camouflaged firing pits near the 'keep'.
My personal experience says to not tie down your defense to one position but to remain mobile. Moving at least every 24 hours launching patrols to harass the enemy, or gain recon for an envelopment maneuver of the smaller invading force.