This paper examines a Markovian model for the optimal irreversible investment problem of a firm aiming at minimizing total expected costs of production. We model market uncertainty and the cost of investment per unit of production capacity, as two independent one-dimensional regular diffusions, and we consider a general convex running cost function. The optimization problem is set as a three-dimensional degenerate singular stochastic control problem. We provide the optimal control as the solution of a reflected diffusion at a suitable boundary surface. Such boundary arises from the analysis of a family of two-dimensional parameter-dependent optimal stopping problems, and it is characterized in terms of the family of unique continuous solutions to parameter-dependent, nonlinear integral equations of Fredholm type.