How to run playframework in background?

I want to run play framework in background, which means if i close my terminal after deploying the play app, the play app will still keep run.
I need my application to be up and running continuously (until I decide to stop it) from the point I run it and I would like it to run in the background (daemon).

I think I will have to use



nohup ./bin/$NAME -Dplay.crypto.secret=abcxyz -Dpidfile.path=/dev/null > /dev/null 2>&1 &

I usually do this by packaging my app as a docker-container and then just run that. before docker, I created a debian package and just installed that on my system, systemd then took care of the rest.
you can use the sbt-native-packager to create all these different kind of packages. Take a look at