We study the demand, inventory, and capacity allocation problem in production systems with multiple inventory locations and a production facility operating under linear and concave costs. Independent stochastic demand from multiple sources is fulfilled from multiple warehouses that are in turn replenished from a shared production facility with stochastic production lead times. We propose a novel formulation of the demand allocation problem, and show that the optimal customer allocations are not necessarily single-sourced. The new formulation allows the inclusion of additional decisions alongside demand and inventory allocation. Capacity decisions are incorporated under two cost structures: linear and concave. For the concave case, we show that for a given demand and inventory allocation, the optimal capacity of the production facility takes on discrete values within a finite set, which allows the objective to be linearized. We demonstrate numerically that the joint optimization of capacity, inventory, and demand allocation decisions has significant cost savings over a sequential decision and leads to a high utilization of the production facility under linear capacity costs, but relatively low utilization under concave costs. Safety stock, on the other hand, at the distribution centers is relatively low under linear and concave cost.