I have developed a small application based on Play Framework (I am still learning). Now I need to bundle it for shipping. One way is to create a war file and deploy it in a servlet container such as tomcat- That is very clear from the docs. The other option is to use the built in http server. This is what I want to do since it is the recommended way.
Now how do I pull off the application from my development application so that I can deploy it into the production server – I mean how do I compile and produce a bundle that can be distributed to my client who will do something like unzip the distribution parkage and run a script to start the server?
Or I put it this way, do I need to set play path on my production server, then copy my project files to the production server so that my user can run it using play run, as I have been doing in my development environment?
The docs only say that I need to change to production mode.
You definitly need to have play in your environment variable if you don’t want to build a war file, because running it on your production server requires ‘play start MYAPP’ (starts the app and puts it in a background process). The App does not run standalone without the framework itself.
Well, this is precisly what the war file is for. If you want autmatic deployment there is IMHO no way around a war file. On the otherhand you dont need the Framework on your production server when building a war file. You could bild the war with play war and the distribute it to your production server (if it is a tomcat) using the maven tomcat plugin.