Skip to content

Deployment Stack

Jake edited this page Jul 1, 2023 · 7 revisions

This section details the stack used to deploy the Major Manager server

Host Machine

  • The Major Manager server uses an EC2 instance running Ubuntu as it's host machine
  • Amazon EC2 instances are widely used and therefore well documented. They are known for being reliable, scalable, secure, cost effective and easy to use
  • PM2 is used to run the Express API in the background of the Amazon EC2 instance
  • PM2 is a popular process manager for Node.js applications
  • To use the process manager, install it globally with sudo npm install -g pm2. We can now run the server in the background via pm2 start server.js. Running pm2 status should now show an application named server has a status of online. To stop the application, run pm2 stop server. To view the logs from the API, run pm2 logs server. This will show you the location of the logs, as well as some of their contents
  • NGINX is a reverse proxy server used to forward client requests to Express
  • It provides the SSL with the help of snapd and certbot
  • NGINX can be configured to handle caching, load balancing and security, amongst other functionality, to help the server handle scaling as the application grows larger

Database Host

  • The Major Manager server was initially hosted on a Heroku machine which integrated easily with the service provider ClearDB to host our MySQL database. After migrating to an AWS instance, we elected to keep using ClearDB
  • ClearDB was very easy to set up and has been very reliable

DNS

  • The Major Manager Server uses Route 53 as it's Domain Name System service
  • Route 53 is a proven service known for being highly scalable and reliable
  • Route 53 was used to register the domain server.highstakesgolfpools.com used by the Major Manager Server
Clone this wiki locally