AWS ec2 selection decision for Play Framework 2.4

Amazon Linux/Ubuntu/Cent OS
not decide, even the below discussion is for creating binary distribution of package
Reference:

activator clean compile dist

use nginx as front load balancer for port forwarding from 80 to 9000

old reference might not work exactly
SCRIPT: /al-start.sh
chmod +x start
nohup ./start -server -Dconfig.resource=application-prod.conf -Dhttp.port=9000 &
A few notes about this script:
  1. I created this script so I don’t have to edit the Play start script.
  2. 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.
  3. 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 80 on the kbhr.co website is served by Nginx, and it does a proxy to serve the Play application.

No comments:

Post a Comment