Play deployment

1)binary distribution
 activator dist
copy target/universal/*.zip to production server ex:/home/ikhbla/workspace

login to production server
cd /home/ikbhal/workspace
$ my-first-app-1.0/bin/my-first-app -Dplay.crypto.secret=abcdefghijk

my-first-app-1.0/bin/my-first-app -Dconfig.file=/full/path/to/conf/application-prod.conf

2)Running with source code in production
Running a production server in place
In some circumstances, you may not want to create a full distribution, you may in fact want to run your application from your project’s source directory. This requires an sbt or activator installation on the server, and can be done using the stage task.

$ activator clean stage

2.1)Running as test instance on production
Running a test instance
Play provides a convenient utility for running a test application in prod mode.

This is not intended for production usage.

To run an application in prod mode, run testProd:

[my-first-app] $ testProd

No comments:

Post a Comment