title: Keep Dotnet Core Grpc Server running as a console application?
body: <p>I am trying to keep a Grpc server running as a console daemon. This gRPC server is a microservice that runs in a docker container.</p>
  
  <p>All of the examples I can find make use of the following:</p>
  
  <pre><code>Console.ReadKey();
  </code></pre>
  
  <p>This does indeed block the main thread and keeps it running but does not work in docker with the following error:</p>
  
  <pre><code>"Cannot read keys when either application does not have a console or when console input has been redirected. Try Console.Read."
  </code></pre>
  
  <p>Now I could probably try to find a workaround for docker specifically, but this still doesn't feel right. Does anyone know of a good "production ready" way to keep the service running?</p>