Running Paya Micro bundled jar as a persistent process in Linux/Ubuntu

18 views
Skip to first unread message

xybrek

unread,
Feb 29, 2020, 11:46:06 AM2/29/20
to Payara Forum
If you run a bundled webapp using "java -jar" from the terminal it works, however, when the terminal exits the process also is killed. 

For example, you run "java -jar backend-server-0-SNAPSHOT-microbundle.jar" it would work but not as a persistent process. 
What is the best way to run a Payara Micro bundled jar that will not terminate when the terminal exits? Much like how a web server works. 

Martin Charlesworth

unread,
Feb 29, 2020, 12:53:12 PM2/29/20
to Payara Forum
In a docker container is a good way. If you use the official payara micro image you just drop your skinny war in the deployment folder and you're done.

David Sharpe

unread,
Mar 1, 2020, 12:50:03 AM3/1/20
to Payara Forum
I think that's the behaviour of any app you run from the terminal, Java apps being no exception. Depending on your OS, Google something like "How to keep program running after terminal exits" and you will find various answers. I have used nohup before, a much more rudimentary solution than Docker but it may be enough for your needs.
Reply all
Reply to author
Forward
0 new messages