Amazon Linux/Ubuntu/Cent OS
not decide, even the below discussion is for creating binary distribution of packageReference:
activator clean compile dist
use nginx as front load balancer for port forwarding from 80 to 9000
old reference might not work exactly
chmod +x start nohup ./start -server -Dconfig.resource=application-prod.conf -Dhttp.port=9000 &
A few notes about this script:
- I created this script so I don’t have to edit the Play
- It uses a Play configuration file named application-prod.conf. That file just needs to be on the classpath, so having it in the Play application conf folder is all you need.
- It runs the server on port
9000. You don’t need to specify that on the command line, but I have a bad memory, so if I want to change this later, it’s easiest to specify it now.Another note about the production environment: Port
80on the kbhr.co website is served by Nginx, and it does a proxy to serve the Play application.