简体   繁体   English

如何在Heroku上以开发模式运行Play Framework 2应用程序?

[英]How do I run a Play Framework 2 app in dev mode on Heroku?

I created a staging app on heroku, and would like it to run in DEV mode. 我在heroku上创建了一个临时应用程序,并希望它在DEV模式下运行。 Also, I have my procfile set to use application.production.conf, but I would like it to use application.staging.conf in my staging app. 另外,我将procfile设置为使用application.production.conf,但我希望它在我的暂存应用程序中使用application.staging.conf。 How can I do this? 我怎样才能做到这一点?

Use an config variable to set this. 使用config变量来设置它。 Like: 喜欢:

Procfile: Procfile:

web: target/start -Dconfig.file=${CONFIG_FILE}

Then set the config for each environment: 然后为每个环境设置配置:

heroku config:add --app my-staging CONFIG_FILE=application.staging.conf
heroku config:add --app my-prod CONFIG_FILE=application.production.conf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何仅在开发模式下在 HTTPS 中运行 Play 框架? - How can I run Play framework in HTTPS only in the dev mode? 我运行游戏框架的生产模式,如何保持其运行背景 - I run a production mode of play framework ,how to keep it running background 如何运行使用Play Framework应用程序数据库的命令行Scala脚本? - How do I run a comand line scala script that uses Play Framework app database? 播放框架在开发人员模式下禁用浏览器调试器 - play framework disable browser debugger in dev mode 如何在IntelliJ中运行Play Framework 2.1项目? - How do I run a Play Framework 2.1 project in IntelliJ? 是否可以在heroku上以测试模式启动Play框架 - Is it possible to start Play framework in test mode on heroku 如何找到Play Framework应用程序的绝对路径? - How do I find the absolute path to a Play Framework app? 使用Play Framework 1.x,如何让JPA在生产模式下创建缺少的数据库表? - Using Play Framework 1.x, how do I get JPA to create missing DB tables in production mode? 如何在开发人员模式下而非生产环境中调用默认错误页面(Play Framework 2.3.4-Java) - How to call default error pages in dev mode but not production (Play Framework 2.3.4 - Java) 将play framework 2.4应用程序部署到heroku - deploying play framework 2.4 app to heroku
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM