【问题标题】:Is `activator dist` sufficient in order to deploy a Play app?`activator dist` 是否足以部署 Play 应用程序?
【发布时间】:2017-03-15 16:17:38
【问题描述】:

我想知道activator dist 是否足以部署 Play 应用? activator clean compile 也应该运行吗?我读过Deploying documentation,但我不清楚。

【问题讨论】:

    标签: playframework typesafe-activator


    【解决方案1】:

    运行dist 已经编译了项目,这就足够了。之前不需要清洁。如果您想先运行测试,请运行:sbt test dist

    dist 的输出在target/universal/project-name.zip,只需将其内容解压缩到生产服务器即可。您可能希望为生产服务器使用不同的配置文件,因此您将像这样运行应用程序:./bin/project-name -Dconfig.file=conf/production.conf

    如果您想构建一个包含所有必要依赖项的胖 jar,请查看 sbt assembly

    【讨论】:

    • 我更喜欢在部署到生产环境之前使用 clean。有时依赖项会发生奇怪的事情:)
    猜你喜欢
    • 2015-02-12
    • 1970-01-01
    • 1970-01-01
    • 2014-10-10
    • 2012-11-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多