Mee42 / cs509-project

2 stars 0 forks source link

Deploy application on AWS EC2 #26

Closed travis-mann closed 4 months ago

travis-mann commented 6 months ago

MySQL: https://dev.mysql.com/downloads/file/?id=526407 VS Code: https://code.visualstudio.com/download Git: https://git-scm.com/download/win

NPM/ Node: https://nodejs.org/en/download

travis-mann commented 4 months ago

Steps:

  1. Add security group to allow all traffic inbound/ outbound from personal public IP and apply it to your EC2
  2. Add a new firewall rule to allow inbound TCP traffic on port 8080
  3. Update "backendURI" in ./frontend/src/endpoints.tsx
  4. cd ./frontend and run npm run build
  5. Copy build artifacts in the ./frontend/dist folder to a production location
  6. Create an IIS HTTP site on port 80 pointing to the build artifacts from the previous step
  7. cd ./backend and run mvn package -DskipTests
  8. Copy the jar created in ./backend/target, i.e "./backend/target/backend-0.0.1-SNAPSHOT.jar" to a production location
  9. Create a scheduled task to run "java -jar backend-0.0.1-SNAPSHOT.jar" on startup in the folder containing that jar. (replace the jar filename with yours if different)
travis-mann commented 4 months ago

Connected to application & swagger docs hosted in EC2 from local computer

image