2

I am writing a script to deploy a play 2.2.1 application.However I have noticed after running the application using command play "start 8084", the application is running at 8084 port but I have to do cntrl+D to exit logs and go back to command promt in ubuntu. Is there a way to go back to console without using cntrl+d....because I have to do this using shell script.

Also I have used stage. but I am getting the following error:

[error] Not a valid command: play (similar: apply, last, alias)
[error] Not a valid project ID: play
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: play (similar: clean)
[error] play

Please help

shomik naik
  • 235
  • 1
  • 3
  • 12

1 Answers1

5

I use something like this with playframework 2.2:

  1. Run play dist for a project
  2. Unzip the prepared zip archive somewhere (it is located in the target\universal folder of your application). The start script will be located at bin/<app_name>
  3. Run the project like this: bash /path/to/your/app/bin/<app_name> -Dhttp.port=8084 & (note the ampersand in the end)

If you are planning to use ssh consider disowning the process or running it with nohup (you may read the details here: Scala start Play server in production) so that the application does not shutdown when you close the ssh session:

bash /path/to/your/app/bin/<app_name> -Dhttp.port=8084 & disown

Community
  • 1
  • 1
serejja
  • 22,901
  • 6
  • 64
  • 72