Skip to content

Latest commit

 

History

History
57 lines (49 loc) · 1.38 KB

README.md

File metadata and controls

57 lines (49 loc) · 1.38 KB

pandatype-backend

Deploy On Production Environment

On Local Machine

  1. Generate p12 keystore from SSL Certificate
    openssl pkcs12 -export -clcerts -in domain.cert.pem -inkey private.key.pem -out springboot.p12
  2. Send p12 keystore to remote
    scp -i AWS_KEY.pem .\springboot.p12 ec2-user@XXXXXXXXXXXXXXXX.amazonaws.com:springboot.p12
  3. Connect to AWS EC2 Instance
    ssh -i "AWS_KEY.pem" ec2-user@XXXXXXXXXXXXXXXX.amazonaws.com

On Remote (AWS EC2 Instance)

  1. Clone the repo
    git clone https://github.com/any-other-guy/pandatype-backend.git
    cd pandatype-backend
  2. Setup all prerequisite software
    bash ec2_setup.sh
  3. Copy SSL Certificate p12 keystore to its respective services at **/resource, also remember to enable SSL in application.properties
    cd
    cp springboot.p12 ./pandatype-backend/leaderboard/src/main/resources/
    cp springboot.p12 ./pandatype-backend/typingtest/src/main/resources/
    cp springboot.p12 ./pandatype-backend/auth/src/main/resources/
    ...
  4. Start services
    cd pandatype-backend
    bash server.sh

Build and Run Locally

Installation

  1. Clone the repo
    git clone https://github.com/any-other-guy/pandatype-backend.git
  2. Run the local build bash script
    cd pandatype-backend
    bash local.sh