Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Latest commit

 

History

History
109 lines (81 loc) · 3.08 KB

File metadata and controls

109 lines (81 loc) · 3.08 KB

Installation using AWS lightsail - Nodejs

📦️ Instance setup

🔒️ SSH access (optional)

If you're not confident with SSH you can open a Terminal using your browser on AWS lightsail by clicking on your instance and skip this step

  • Create SSH key pairs

    • Go to AWS lightsail > SSH keys
    • Select default key
    • Download the .pem file (let's pretend that you saved it here ~/Downloads/key.pem)
  • Test your access

    • Open a local terminal session

    • Adjust your key rights with this :

      chmod 400 ~/Downloads/key.pem
  • SSH to your instance using the downloaded key like this (you can find the username/ip by selecting your instance here) :

    ssh [email protected] -i ~/Downloads/key.pem

🚀 Install and configure app

Your Node.js instance must be a Bitnami one

  • Open a terminal session with your instance

  • Clone the app sources :

    git clone https://github.com/thibaultyou/tradingview-alerts-processor.git
  • Install app and configure the server :

    cd tradingview-alerts-processor/
    sh install.node.sh
  • You should see npm entry with online status, if this is not the case reconfigure PM2 and check again with :

    pm2 start npm -- start
    pm2 save
    pm2 status npm

💄 Optional steps

For those steps you need to be logged in your instance, see the first command in 🚀 Install and configure app

  • Check app logs :

    pm2 logs npm
  • Check trading logs :

    tail -f logs/trades.log
  • Update the app :

    cd tradingview-alerts-processor/
    sh update.node.sh
  • Restrict commands to Tradingview alerts system only, once activated you'll not be able to send commands from your computer with HTTP requests, please add your accounts before using this :

    • Go to AWS lightsail > your instance > Networking
    • Add a filter rule on TCP port 80
    • Check restrict to IP
    • Add the following :
      • 52.89.214.238
      • 34.212.75.30
      • 54.218.53.128
      • 52.32.178.7