title: Deploying Play 2.0 app on Heroku
body: <p>So I am kind of new to setting up servers. And I have been struggling with various sql issues all night. I think the only thing that sits between me and a successfully running play app is this: error</p>
  
  <pre><code>Starting process with command `target/start -Dhttp.port=80 `
  2012-04-04T05:58:52+00:00 app[web.1]: Play server process ID is 1
  2012-04-04T05:58:53+00:00 app[web.1]: [info] play - database [default] connected at jdbc:mysql://us-cdbr-east.cleardb.com/heroku_cd914b667dae168
  2012-04-04T05:58:56+00:00 app[web.1]: [info] play - Application started (Prod)
  2012-04-04T05:58:56+00:00 app[web.1]: Oops, cannot start the server.
  2012-04-04T05:58:56+00:00 app[web.1]: org.jboss.netty.channel.ChannelException: Failed to bind to: /0.0.0.0:80
  ... more errors
  </code></pre>
  
  <p>Does anyone spot any problems? Do I need any java options arguments?</p>
  
  <p>I tried specifying a user port in the <code>Procfile</code>, and got a different error message:</p>
  
  <pre><code>2012-04-04T07:01:36+00:00 heroku[web.1]: Starting process with command `target/start -Dhttp.port=2000`
  2012-04-04T07:01:37+00:00 app[web.1]: Play server process ID is 1
  2012-04-04T07:01:40+00:00 app[web.1]: [info] play - database [default] connected at jdbc:mysql://us-cdbr-east.cleardb.com/heroku_cd914b667dae168
  2012-04-04T07:01:45+00:00 app[web.1]: [info] play - Application started (Prod)
  2012-04-04T07:01:45+00:00 app[web.1]: [info] play - Listening for HTTP on port 2000...
  2012-04-04T07:01:46+00:00 heroku[web.1]: Error R11 (Bad bind) -&gt; Process bound to port 2000, should be 47248 (see environment variable PORT)
  2012-04-04T07:01:46+00:00 heroku[web.1]: Stopping process with SIGKILL
  2012-04-04T07:01:47+00:00 heroku[web.1]: Process exited with status 137
  2012-04-04T07:01:47+00:00 heroku[web.1]: State changed from starting to crashed
  </code></pre>
  
  <p>I have no idea what is happening. How do I change this environment variable? This heroku process model is very confusing to me.</p>