scala

Scala

部署Play应用

  1. 生成application secret

进入项目文件夹,这里是lila,sbt进入console

1
2
3
4
5
6
7
8
[root@localhost lila]# sbt
[info] Loading project definition from /root/lila/project
[info] Resolving key references (30068 settings) ...
[info] Set current project to lila (in build file:/root/lila/)
[lila] $ playGenerateSecret
[info] Generated new secret: am>NTOksG4<p^jAk_^SN=Dftzv/reDyiv`>GI]Xg=2Se@3IJt677GwuV6_t[GTQ_
[success] Total time: 2 s, completed Jan 11, 2019 3:23:32 PM
[lila] $

或者直接playUpdateSecret,自动生成secret并且写入conf/application.conf文件中

  1. set-cookie未生效的问题

set-cookie有domain信息,与当前的url不一致,所以没有设置cookie

Reference

  1. https://www.playframework.com/documentation/2.6.x/Deploying#Deploying-your-application