如何创建 play heroku procfile? [英] How to create play heroku procfile?

查看:25
本文介绍了如何创建 play heroku procfile?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照这里的指示

http://blog.heroku.com/archives/2011/8/29/play/

但我做了play run然后git push heroku master但是没有找到procfile.

but I do play run and then git push heroku master but a procfile is not found.

-----> No Procfile found. Will use process: 
       play run --http.port=$PORT $PLAY_OPTS

  1. 如何显式创建 procfile?
  2. 说明似乎表明我应该在应用程序运行时推送到 heroku master.我读错了吗?
  3. 在哪里可以为 mydomain.herokuapp.com 指定 $PORT$PLAY_OPTS?
  4. 是否只修改 application.conf 中 %prod 的值更好?
  1. How do I explicitly create a procfile?
  2. The instructions seem to indicate that I should push to heroku master while the app is running. Am I reading that wrong?
  3. Where can I specify $PORT and $PLAY_OPTS for mydomain.herokuapp.com?
  4. Is it better to just modify the values for %prod in application.conf?

推荐答案

您需要在项目的根目录中创建一个名为 Procfile 的文件,并且对于 Play,它应该包含

You need to create a file named Procfile in the root of your project and for Play it should contain

web: play run --http.port=$PORT $PLAY_OPTS

然后部署应用程序时,$PORT 和 $PLAY_OPTS 将在应用程序启动时由 heroku 设置.

When you then deploy your application the $PORT and $PLAY_OPTS will be set by heroku when the application is started.

这篇关于如何创建 play heroku procfile?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆