Play Framework 2.1.1 Deployment Issues

感情迁移 提交于 2019-12-03 14:11:34

Either

play "start -Dhttp.port=80 -DapplyEvolutions.default=true"

or

play dist

then, unzipping and running the generated start script,

./start -Dhttp.port=80 -DapplyEvolutions.default=true

will work.

Ok, so I didn't really find a solution for this, but I found a workaround. This isn't anywhere in the Play Framework 2.x documentation (yet), so I figure I'll put it here in case someone else gets stuck:

Putting applyEvolutions.default=true into application.conf DOES work, and will make database evolutions apply automatically. The command line argument -DapplyEvolutions.default=true DOES NOT work and is ignored for reasons unknown.

Putting http.port=80 into application.conf DOES NOT work. The command line argument -Dhttp.port=80 also DOES NOT work for setting the port number to run on.

So, to set the port number use this command instead:

play "start 80" or play "run 80" (use double quotes exactly as shown).

For some reason when the port command is written exactly as above in double quotes, the port number to run on is set properly.

This is not found in the framework documentation anywhere. I'd create another pull request to add it, but the last issue I solved for this framework (database encryption) was denigrated as being a "limited, niche use case" only and the documentation update was thus denied. I may still try anyway.

Hope this helps someone.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!