How to deploy a play application(v.2.6) in Prod server?

I have written a set of RESTful APIs by using Play Framework 2.6.16 in Java. I use dist command to make a zip file, and upzip it on my server which only installed JDK1.8.

unzip my-app-1.0/bin/my-app -Dplay.http.secret.key=abcdefghijk

But I can’t exit Play console after above command executed, Ctrl+D not working, Ctrl+C working but it also kill the app.

I don’t know what to do next, does anybody have a solution? Please give a help, thank you in advance.

This is more like a linux question about how to run a program in the background. You can use nohup to run the command, so that you can logout without killing the application. You can also use tmux or session to achieve the same thing.

Things get more complicated when you want to deploy a new version, and you have to kill the previous version and etc. I’d suggest using Heroku (or a similar platform) if applicable.

1 Like

Thank you for your help, I resolved this problem. Your comment was helpful enough.