How to bring down a application for certain period of time
Discussion posts and replies are publicly visible
OOTB you can use the 'Maintenance Window' feature in the Admin Console but this will apply to the whole environment, not to a specific Application. Otherwise you can do exactly as describes, to toggle the value of a constant which is used to hide the default landing pages for all of the roles involved in your application and replace with a blanket "This Application is undergoing maintenance" message or equivalent as the only User Interface they can see.